diff --git a/alembic/versions/d4e446637f18_channel_tag.py b/alembic/versions/d4e446637f18_channel_tag.py index 7a99eefd..b149ccfa 100644 --- a/alembic/versions/d4e446637f18_channel_tag.py +++ b/alembic/versions/d4e446637f18_channel_tag.py @@ -23,7 +23,7 @@ def upgrade(): bind = op.get_bind() session = Session(bind=bind) - session.execute('ALTER TABLE channel ADD COLUMN tag_id INTEGER REFERENCES tag(id)') + session.execute('ALTER TABLE channel ADD COLUMN IF NOT EXISTS tag_id INTEGER REFERENCES tag(id)') def downgrade():