fix(backend): create pricetier enum before migration
This commit is contained in:
parent
0e439b4ca7
commit
30315fdf56
1 changed files with 5 additions and 1 deletions
|
|
@ -20,11 +20,15 @@ depends_on: Union[str, Sequence[str], None] = None
|
|||
|
||||
|
||||
def upgrade() -> None:
|
||||
bind = op.get_bind()
|
||||
price_tier_enum = sa.Enum("BUDGET", "MID", "PREMIUM", "LUXURY", name="pricetier")
|
||||
price_tier_enum.create(bind, checkfirst=True)
|
||||
|
||||
op.add_column(
|
||||
"products",
|
||||
sa.Column(
|
||||
"price_tier",
|
||||
sa.Enum("BUDGET", "MID", "PREMIUM", "LUXURY", name="pricetier"),
|
||||
price_tier_enum,
|
||||
nullable=True,
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue