Merge db-migrations: Add Flask-Migrate support and clean up old migration system

This commit is contained in:
2025-07-13 12:17:20 +02:00
parent 7140aeba41
commit 1500b2cf88
65 changed files with 2153 additions and 7881 deletions

19
test_migrate.py Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env python
"""Test script to verify Flask-Migrate setup"""
from app import app, db, migrate
from flask_migrate import init, migrate as _migrate, upgrade
with app.app_context():
print("Flask app created successfully")
print(f"Database URI: {app.config['SQLALCHEMY_DATABASE_URI']}")
print(f"Migrate instance: {migrate}")
print(f"Available commands: {app.cli.commands}")
# Check if 'db' command is registered
if 'db' in app.cli.commands:
print("'db' command is registered!")
print(f"Subcommands: {list(app.cli.commands['db'].commands.keys())}")
else:
print("ERROR: 'db' command is NOT registered!")
print(f"Available commands: {list(app.cli.commands.keys())}")