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:
28
migrate_add_business_day_start.py
Normal file
28
migrate_add_business_day_start.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import sqlite3
|
||||
|
||||
def migrate():
|
||||
conn = sqlite3.connect('waiting_system.db')
|
||||
cursor = conn.cursor()
|
||||
|
||||
try:
|
||||
# Check if column exists
|
||||
cursor.execute("PRAGMA table_info(store_settings)")
|
||||
columns = [column[1] for column in cursor.fetchall()]
|
||||
|
||||
if 'business_day_start' not in columns:
|
||||
print("Adding business_day_start column to store_settings table...")
|
||||
# 기본값 5 (05:00)
|
||||
cursor.execute("ALTER TABLE store_settings ADD COLUMN business_day_start INTEGER DEFAULT 5")
|
||||
conn.commit()
|
||||
print("Successfully added business_day_start column.")
|
||||
else:
|
||||
print("business_day_start column already exists.")
|
||||
|
||||
except Exception as e:
|
||||
print(f"An error occurred: {e}")
|
||||
conn.rollback()
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
migrate()
|
||||
Reference in New Issue
Block a user