Add waiting system application files
- Add main application files (main.py, models.py, schemas.py, etc.) - Add routers for all features (waiting, attendance, members, etc.) - Add HTML templates for admin and user interfaces - Add migration scripts and utility files - Add Docker configuration - Add documentation files - Add .gitignore to exclude database and cache files 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
31
migrate_add_block_last_class.py
Normal file
31
migrate_add_block_last_class.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""
|
||||
데이터베이스 마이그레이션: store_settings 테이블에 block_last_class_registration 컬럼 추가
|
||||
"""
|
||||
import sqlite3
|
||||
|
||||
def migrate():
|
||||
# 데이터베이스 연결
|
||||
conn = sqlite3.connect('waiting_system.db')
|
||||
cursor = conn.cursor()
|
||||
|
||||
try:
|
||||
# block_last_class_registration 컬럼 추가 (기본값 0 = False)
|
||||
cursor.execute('''
|
||||
ALTER TABLE store_settings
|
||||
ADD COLUMN block_last_class_registration INTEGER DEFAULT 0
|
||||
''')
|
||||
|
||||
conn.commit()
|
||||
print("✅ 마이그레이션 성공: block_last_class_registration 컬럼이 추가되었습니다.")
|
||||
|
||||
except sqlite3.OperationalError as e:
|
||||
if "duplicate column name" in str(e).lower():
|
||||
print("ℹ️ block_last_class_registration 컬럼이 이미 존재합니다.")
|
||||
else:
|
||||
print(f"❌ 마이그레이션 실패: {e}")
|
||||
raise
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
migrate()
|
||||
Reference in New Issue
Block a user