import asyncio
from common.sqlite_client import init_sqlite, close_sqlite, sqlite_client

async def migrate():
    await init_sqlite()
    try:
        # Add tags column to team_memos
        await sqlite_client.execute("ALTER TABLE cuccu_team_memos ADD COLUMN tags TEXT DEFAULT '[]'")
        print("✅ Added tags column to cuccu_team_memos")
    except Exception as e:
        print("Error during migration:", e)
    finally:
        await close_sqlite()

if __name__ == "__main__":
    asyncio.run(migrate())
