Spaces:
Sleeping
Sleeping
| import asyncio | |
| from sqlalchemy import text | |
| from app.core.database import engine | |
| async def check_enum(): | |
| async with engine.connect() as conn: | |
| result = await conn.execute(text(""" | |
| SELECT enumlabel FROM pg_enum | |
| WHERE enumtypid = (SELECT oid FROM pg_type WHERE typname = 'partytype') | |
| """)) | |
| labels = [row[0] for row in result] | |
| print(f'Current enum values: {labels}') | |
| asyncio.run(check_enum()) | |