fix: auto-apply feature fixes migration on startup
All checks were successful
Deploy Development / deploy (push) Successful in 33s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 12s

This commit is contained in:
Lars 2026-03-20 12:58:07 +01:00
parent cbad50a987
commit cd4d9124b0

View File

@ -83,6 +83,26 @@ def apply_migration():
print("[v9c Migration] ✅ Migration completed successfully!")
# Apply fix migration if exists
fix_migration_path = os.path.join(
os.path.dirname(__file__),
"migrations",
"v9c_fix_features.sql"
)
if os.path.exists(fix_migration_path):
print("[v9c Migration] Applying feature fixes...")
with open(fix_migration_path, 'r', encoding='utf-8') as f:
fix_sql = f.read()
conn = get_db_connection()
cur = conn.cursor()
cur.execute(fix_sql)
conn.commit()
cur.close()
conn.close()
print("[v9c Migration] ✅ Feature fixes applied!")
# Verify tables created
conn = get_db_connection()
cur = conn.cursor()