| 123456789101112131415 |
- from app import create_app, db
- from sqlalchemy import text
- app = create_app()
- with app.app_context():
- print("Adding description column to carousel table...")
- try:
- db.session.execute(text('ALTER TABLE carousel ADD COLUMN description VARCHAR(256);'))
- print("Added description")
- except Exception as e:
- print("description might already exist:", e)
-
- db.session.commit()
- print("Migration completed.")
|