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:
26
add_column.py
Normal file
26
add_column.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from database import SessionLocal, engine
|
||||
from sqlalchemy import text
|
||||
|
||||
def add_column():
|
||||
db = SessionLocal()
|
||||
try:
|
||||
# Check if column exists
|
||||
result = db.execute(text("PRAGMA table_info(store_settings)"))
|
||||
columns = [row[1] for row in result.fetchall()]
|
||||
|
||||
if 'auto_register_member' not in columns:
|
||||
print("Adding auto_register_member column to store_settings table...")
|
||||
db.execute(text("ALTER TABLE store_settings ADD COLUMN auto_register_member BOOLEAN DEFAULT 0"))
|
||||
db.commit()
|
||||
print("Column added successfully.")
|
||||
else:
|
||||
print("Column already exists.")
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
db.rollback()
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
add_column()
|
||||
Reference in New Issue
Block a user