auth email/password

This commit is contained in:
JSC
2025-06-28 18:30:30 +02:00
parent 8e2dbd8723
commit ceafed9108
25 changed files with 1694 additions and 314 deletions

28
migrate_db.py Normal file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env python3
"""Database migration script for Flask-Migrate."""
import os
from flask.cli import FlaskGroup
from app import create_app
from app.database import db
app = create_app()
cli = FlaskGroup(app)
@cli.command()
def init_db():
"""Initialize the database."""
print("Initializing database...")
db.create_all()
print("Database initialized successfully!")
@cli.command()
def reset_db():
"""Reset the database (drop all tables and recreate)."""
print("Resetting database...")
db.drop_all()
db.create_all()
print("Database reset successfully!")
if __name__ == "__main__":
cli()