Files
waiting-system/migrate_name_display_length.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

20 lines
633 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.
"""Add name_display_length column to store_settings table"""
from database import SessionLocal, engine
from sqlalchemy import text
db = SessionLocal()
try:
# Add the column if it doesn't exist
db.execute(text("ALTER TABLE store_settings ADD COLUMN name_display_length INTEGER DEFAULT 0"))
db.commit()
print("✅ Successfully added name_display_length column")
except Exception as e:
if "duplicate column name" in str(e).lower() or "already exists" in str(e).lower():
print(" Column already exists, skipping...")
else:
print(f"❌ Error: {e}")
db.rollback()
finally:
db.close()