Skip to content

Commit

Permalink
Fix: migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Rotheem committed Jan 7, 2025
1 parent 3f2a87b commit 08acd0d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions migrations/versions/27-schools.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class AccountType2(enum.Enum):
school_table = sa.Table(
"core_school",
sa.MetaData(),
sa.Column("id", sa.String(), nullable=False),
sa.Column("id", sa.Uuid(), nullable=False),
sa.Column("name", sa.String(), nullable=False),
sa.Column("email_regex", sa.String(), nullable=False),
)
Expand All @@ -61,7 +61,7 @@ class AccountType2(enum.Enum):
sa.Column("id", sa.String(), nullable=False),
sa.Column("email", sa.String(), nullable=False),
sa.Column("account_type", sa.Enum(AccountType, name="accounttype"), nullable=False),
sa.Column("school_id", sa.String(), nullable=False),
sa.Column("school_id", sa.Uuid(), nullable=False),
)

visibility_table = sa.Table(
Expand All @@ -80,7 +80,7 @@ def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"core_school",
sa.Column("id", sa.String(), nullable=False, index=True),
sa.Column("id", sa.Uuid(), nullable=False, index=True),
sa.Column("name", sa.String(), nullable=False, index=True, unique=True),
sa.Column("email_regex", sa.String(), nullable=False),
sa.PrimaryKeyConstraint("id"),
Expand Down Expand Up @@ -108,7 +108,7 @@ def upgrade() -> None:
batch_op.add_column(
sa.Column(
"school_id",
sa.String(),
sa.Uuid(),
nullable=False,
server_default="dce19aa2-8863-4c93-861e-fb7be8f610ed",
),
Expand Down

0 comments on commit 08acd0d

Please sign in to comment.