Spaces:
Runtime error
Runtime error
Download fix_enum.py from Antaram/pratikbackend: direct link, hf CLI and curl.
- Browser
- Download file 357 Bytes
-
https://huggingface.co/spaces/Antaram/pratikbackend/resolve/main/fix_enum.py
- Command line
-
hf download hf://spaces/Antaram/pratikbackend/fix_enum.py
-
curl -L -o fix_enum.py https://huggingface.co/spaces/Antaram/pratikbackend/resolve/main/fix_enum.py
357 Bytes
| import asyncio | |
| from sqlalchemy import text | |
| from app.core.database import engine | |
| async def alter_enum(): | |
| async with engine.begin() as conn: | |
| # Add patti_awaak to the enum | |
| await conn.execute(text("ALTER TYPE partytype ADD VALUE IF NOT EXISTS 'patti_awaak'")) | |
| print('Added patti_awaak to partytype enum') | |
| asyncio.run(alter_enum()) | |