from app import app from extensions import db from models import GenerationRecord with app.app_context(): try: db.create_all() print("✅ 数据库表同步成功 (包括 GenerationRecord)") except Exception as e: print(f"❌ 同步失败: {e}")