from app import app, db with app.app_context(): # Drop all tables db.drop_all() # Create all tables with the updated schema db.create_all() print("Database recreated with updated schema")