Skip to content

Commit c3130b0

Browse files
committed
fix: update election type max length to 32
1 parent af9e464 commit c3130b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/alembic/versions/6b58a293a7df_add_unique_constraint_officer_term_71.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
def upgrade() -> None:
2222
# ### commands auto generated by Alembic - please adjust! ###
2323
op.alter_column("election", "type",
24-
existing_type=sa.VARCHAR(length=64),
24+
existing_type=sa.VARCHAR(length=32),
2525
nullable=False)
2626
op.alter_column("officer_term", "start_date",
2727
existing_type=sa.DATE(),

src/elections/tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Election(Base):
2424
# Slugs are unique identifiers
2525
slug: Mapped[str] = mapped_column(String(MAX_ELECTION_SLUG), primary_key=True)
2626
name: Mapped[str] = mapped_column(String(MAX_ELECTION_NAME), nullable=False)
27-
type: Mapped[ElectionTypeEnum] = mapped_column(String(64), default=ElectionTypeEnum.GENERAL)
27+
type: Mapped[ElectionTypeEnum] = mapped_column(String(32), default=ElectionTypeEnum.GENERAL)
2828
datetime_start_nominations: Mapped[datetime] = mapped_column(DateTime, nullable=False)
2929
datetime_start_voting: Mapped[datetime] = mapped_column(DateTime, nullable=False)
3030
datetime_end_voting: Mapped[datetime] = mapped_column(DateTime, nullable=False)

0 commit comments

Comments
 (0)