From 8ecc9376bed3460834ff35ba425f8c933f8fcf4c Mon Sep 17 00:00:00 2001 From: seeleng Date: Thu, 31 Oct 2024 15:43:46 +0800 Subject: [PATCH] fix: hacky alembic fix --- .../versions/4f9ec96fc98e_add_unverified_tier.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/alembic/versions/4f9ec96fc98e_add_unverified_tier.py b/backend/alembic/versions/4f9ec96fc98e_add_unverified_tier.py index 316e4a59..fa8da5e2 100644 --- a/backend/alembic/versions/4f9ec96fc98e_add_unverified_tier.py +++ b/backend/alembic/versions/4f9ec96fc98e_add_unverified_tier.py @@ -12,7 +12,8 @@ import sqlalchemy as sa import sqlalchemy.orm as orm from alembic_postgresql_enum import TableReference -from src.limits.models import Tier +from src.common.base import Base +from src.limits.models import TierNames # revision identifiers, used by Alembic. revision: str = "4f9ec96fc98e" @@ -21,6 +22,15 @@ depends_on: Union[str, Sequence[str], None] = None +class Tier(Base): + __tablename__ = "tier" + + id: orm.Mapped[int] = orm.mapped_column(primary_key=True) + tier_name: orm.Mapped[TierNames] + label: orm.Mapped[str] + gp_question_limit: orm.Mapped[int] + + def upgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.sync_enum_values(