"""Recreate partners table with updated schema.""" import asyncio from sqlalchemy import text from sqlmodel import SQLModel from app.core.database import async_engine from app.models import Partner async def recreate_partners(): """Drop and recreate partners table.""" async with async_engine.begin() as conn: # Drop old table await conn.execute(text("DROP TABLE IF EXISTS partners CASCADE")) print("✅ Dropped partners table") # Create new table with updated schema await conn.run_sync(SQLModel.metadata.create_all) print("✅ Created partners table with new schema") if __name__ == "__main__": asyncio.run(recreate_partners())