Skip to content

Commit

Permalink
Two more column types for check_constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed Jan 3, 2024
1 parent f811ab8 commit 12c22f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions funnel/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class Account(UuidMixin, BaseMixin[int, 'Account'], Model):
_state: Mapped[int] = sa_orm.mapped_column(
'state',
sa.SmallInteger,
StateManager.check_constraint('state', ACCOUNT_STATE),
StateManager.check_constraint('state', ACCOUNT_STATE, sa.SmallInteger),
nullable=False,
default=ACCOUNT_STATE.ACTIVE,
)
Expand All @@ -246,7 +246,7 @@ class Account(UuidMixin, BaseMixin[int, 'Account'], Model):
_profile_state: Mapped[int] = sa_orm.mapped_column(
'profile_state',
sa.SmallInteger,
StateManager.check_constraint('profile_state', PROFILE_STATE),
StateManager.check_constraint('profile_state', PROFILE_STATE, sa.SmallInteger),
nullable=False,
default=PROFILE_STATE.AUTO,
)
Expand Down

0 comments on commit 12c22f7

Please sign in to comment.