from app import app, db def clear_database(): with app.app_context(): db.drop_all() db.create_all() print("Database cleared and structure recreated.") if __name__ == '__main__': clear_database()