- 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>
21 lines
722 B
Python
21 lines
722 B
Python
import sqlite3
|
|
|
|
def migrate():
|
|
conn = sqlite3.connect('waiting_system.db')
|
|
cursor = conn.cursor()
|
|
|
|
try:
|
|
# daily_opening_rule 컬럼 추가 (기본값: flexible - 기존 동작과 유사하게 다음날로 넘기는 것 등 허용)
|
|
# strict: 1일 1회 개점만 허용
|
|
# flexible: 2회 이상 개점 허용 (다음날로 처리)
|
|
cursor.execute("ALTER TABLE store_settings ADD COLUMN daily_opening_rule TEXT DEFAULT 'strict'")
|
|
print("Added column daily_opening_rule to store_settings")
|
|
except sqlite3.OperationalError as e:
|
|
print(f"Column already exists or error: {e}")
|
|
|
|
conn.commit()
|
|
conn.close()
|
|
|
|
if __name__ == "__main__":
|
|
migrate()
|