diff --git a/app/core/models_core.py b/app/core/models_core.py index 8e6f44c6f..670b6566c 100644 --- a/app/core/models_core.py +++ b/app/core/models_core.py @@ -129,8 +129,8 @@ class CoreSchool(Base): __tablename__ = "core_school" id: Mapped[PrimaryKey] - name: Mapped[str] = mapped_column(String, index=True, nullable=False, unique=True) - email_regex: Mapped[str] = mapped_column(String, nullable=False) + name: Mapped[str] = mapped_column(String, unique=True) + email_regex: Mapped[str] = mapped_column(String) class CoreAssociationMembership(Base): diff --git a/migrations/versions/27-schools.py b/migrations/versions/27-schools.py index a58e8d49c..6927e2b8d 100644 --- a/migrations/versions/27-schools.py +++ b/migrations/versions/27-schools.py @@ -81,7 +81,7 @@ def upgrade() -> None: op.create_table( "core_school", sa.Column("id", sa.Uuid(), nullable=False, index=True), - sa.Column("name", sa.String(), nullable=False, index=True, unique=True), + sa.Column("name", sa.String(), nullable=False, unique=True), sa.Column("email_regex", sa.String(), nullable=False), sa.PrimaryKeyConstraint("id"), )