Files
waiting-system/migrate_add_use_max_waiting_limit.py
Jun-dev f699a29a85 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>
2025-12-14 00:29:39 +09:00

32 lines
1007 B
Python
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
데이터베이스 마이그레이션: store_settings 테이블에 use_max_waiting_limit 컬럼 추가
"""
import sqlite3
def migrate():
conn = sqlite3.connect('waiting_system.db')
cursor = conn.cursor()
try:
# use_max_waiting_limit 컬럼 추가 (기본값 TRUE - 기존 동작 유지)
cursor.execute("""
ALTER TABLE store_settings
ADD COLUMN use_max_waiting_limit BOOLEAN DEFAULT 1
""")
conn.commit()
print("✅ 마이그레이션 성공: use_max_waiting_limit 컬럼이 추가되었습니다.")
print(" 기본값: TRUE (기존 동작 유지)")
except sqlite3.OperationalError as e:
if "duplicate column name" in str(e).lower():
print(" use_max_waiting_limit 컬럼이 이미 존재합니다.")
else:
print(f"❌ 마이그레이션 실패: {e}")
raise
finally:
conn.close()
if __name__ == "__main__":
migrate()