From ae3741c9ee622517495be9f283423d8993a97be5 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Mon, 29 Dec 2025 18:36:51 -0800 Subject: [PATCH] fix: explicitly create preferencetier enum --- .../alembic/versions/b1ca95289d88_manual_notification_fix.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/alembic/versions/b1ca95289d88_manual_notification_fix.py b/backend/alembic/versions/b1ca95289d88_manual_notification_fix.py index 7ab15b5..70eb48b 100644 --- a/backend/alembic/versions/b1ca95289d88_manual_notification_fix.py +++ b/backend/alembic/versions/b1ca95289d88_manual_notification_fix.py @@ -44,6 +44,11 @@ def upgrade() -> None: # 2. Add missing columns to UserVerticalPreference if they don't exist columns = [c['name'] for c in inspector.get_columns('userverticalpreference')] + # Explicitly create type execution for Postgres + from sqlalchemy.dialects import postgresql + enum_type = postgresql.ENUM('HEADLINER', 'MAIN_STAGE', 'SUPPORTING', name='preferencetier') + enum_type.create(op.get_bind(), checkfirst=True) + with op.batch_alter_table('userverticalpreference', schema=None) as batch_op: if 'tier' not in columns: batch_op.add_column(sa.Column('tier', sa.Enum('HEADLINER', 'MAIN_STAGE', 'SUPPORTING', name='preferencetier'), server_default='MAIN_STAGE', nullable=False))