Files
waiting-system/migrate_add_empty_seat.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
894 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.
"""
데이터베이스 마이그레이션: waiting_list 테이블에 is_empty_seat 컬럼 추가
"""
import sqlite3
def migrate():
# 데이터베이스 연결
conn = sqlite3.connect('waiting_system.db')
cursor = conn.cursor()
try:
# is_empty_seat 컬럼 추가 (기본값 False)
cursor.execute('''
ALTER TABLE waiting_list
ADD COLUMN is_empty_seat BOOLEAN DEFAULT 0
''')
conn.commit()
print("✅ 마이그레이션 성공: is_empty_seat 컬럼이 추가되었습니다.")
except sqlite3.OperationalError as e:
if "duplicate column name" in str(e).lower():
print(" is_empty_seat 컬럼이 이미 존재합니다.")
else:
print(f"❌ 마이그레이션 실패: {e}")
raise
finally:
conn.close()
if __name__ == "__main__":
migrate()