diff --git a/backend/apply_v9c_migration.py b/backend/apply_v9c_migration.py index 4a3bba5..a639b75 100644 --- a/backend/apply_v9c_migration.py +++ b/backend/apply_v9c_migration.py @@ -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()