
from app import create_app
from app.extensions import db

app = create_app()
with app.app_context():
    db.create_all()
    
    # SQLite-compatible table listing
    result = db.engine.execute('SELECT name FROM sqlite_master WHERE type="table"')
    tables = [row[0] for row in result]
    
    print('Database tables created:')
    for table in sorted(tables):
        print(f'  ✅ {table}')
    print(f'Total tables: {len(tables)}')
    print(f'Database: SQLite')
