Skip to content

Commit

Permalink
FIX patch temporarily migration
Browse files Browse the repository at this point in the history
  • Loading branch information
eboileau committed Jul 15, 2024
1 parent 4c10291 commit c778a48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@

def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("modomics", sa.Column("reference_id", sa.Integer(), nullable=False))
op.create_unique_constraint(
op.f("uq_modomics_reference_id"), "modomics", ["reference_id"]
)
op.add_column("modomics", sa.Column("reference_id", sa.Integer()))
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(op.f("uq_modomics_reference_id"), "modomics", type_="unique")
op.drop_column("modomics", "reference_id")
# ### end Alembic commands ###
4 changes: 1 addition & 3 deletions server/src/scimodom/database/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ class Modomics(Base):
id: Mapped[str] = mapped_column(
String(128), primary_key=True, autoincrement=False
) # MODOMICS code
reference_id: Mapped[int] = mapped_column(
nullable=False, unique=True
) # MODOMICS database id
reference_id: Mapped[int] # nullable=False, unique=True MODOMICS database id
name: Mapped[str] = mapped_column(String(255), nullable=False, unique=True)
short_name: Mapped[str] = mapped_column(String(32), nullable=False, unique=True)
moiety: Mapped[str] = mapped_column(String(32), nullable=False)
Expand Down

0 comments on commit c778a48

Please sign in to comment.