Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions alembic/versions/835999dfb9e3_add_scix_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def upgrade():
bind = op.get_bind()
inspector = sa.inspect(bind)
if not inspector.has_table("resolved_reference"):
if "resolved_reference" not in inspector.get_table_names():
raise RuntimeError(
"Migration 835999dfb9e3 requires table `resolved_reference`, "
"but it does not exist. Database schema and alembic_version are out of sync."
Expand All @@ -32,7 +32,7 @@ def upgrade():
def downgrade():
bind = op.get_bind()
inspector = sa.inspect(bind)
if not inspector.has_table("resolved_reference"):
if "resolved_reference" not in inspector.get_table_names():
return
columns = {c["name"] for c in inspector.get_columns("resolved_reference")}
if "scix_id" in columns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def upgrade():
bind = op.get_bind()
inspector = sa.inspect(bind)
if not inspector.has_table("resolved_reference"):
if "resolved_reference" not in inspector.get_table_names():
raise RuntimeError(
"Migration 9a4b1e8b6c7d requires table `resolved_reference`, "
"but it does not exist. Database schema and alembic_version are out of sync."
Expand All @@ -35,7 +35,7 @@ def upgrade():
def downgrade():
bind = op.get_bind()
inspector = sa.inspect(bind)
if not inspector.has_table("resolved_reference"):
if "resolved_reference" not in inspector.get_table_names():
return

columns = {c["name"] for c in inspector.get_columns("resolved_reference")}
Expand Down
Loading