Only run archivalook migration if the tables aren't there.
Standard for anything existing before the Alembic move-over, but I forgot this one. * mediagoblin/plugins/archivalook/migrations/b10b5f822789_archivalook_plugin_initial_migration.py (upgrade): Add has_table check, skip if such a table already exists.
This commit is contained in:
parent
ddbe3fef8c
commit
c527242841
@ -17,6 +17,11 @@ import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
if op.get_bind().engine.has_table('archivalook__featured_media'):
|
||||
# Skip; this has already been instantiated
|
||||
# (probably via sqlalchemy-migrate)
|
||||
return
|
||||
|
||||
op.create_table(
|
||||
'archivalook__featured_media',
|
||||
sa.Column('id', sa.Integer(), nullable=False),
|
||||
|
Loading…
x
Reference in New Issue
Block a user