-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
9015c5c
commit 7d44fa4
Showing
23 changed files
with
413 additions
and
598 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
alembic/versions/20241015_1938277e993f_remove_hold_external_identifier.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"""Remove Hold.external_identifier | ||
Revision ID: 1938277e993f | ||
Revises: 87901a6323d6 | ||
Create Date: 2024-10-15 19:47:55.697280+00:00 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "1938277e993f" | ||
down_revision = "87901a6323d6" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.drop_constraint("holds_external_identifier_key", "holds", type_="unique") | ||
op.drop_column("holds", "external_identifier") | ||
|
||
|
||
def downgrade() -> None: | ||
op.add_column( | ||
"holds", | ||
sa.Column( | ||
"external_identifier", sa.VARCHAR(), autoincrement=False, nullable=True | ||
), | ||
) | ||
op.create_unique_constraint( | ||
"holds_external_identifier_key", "holds", ["external_identifier"] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.