Making Channel.tag_id migration lazier to avoid rare errors.

This commit is contained in:
Roland 2024-10-08 17:18:57 -06:00
parent 79e88d1bc6
commit ca51f3a268
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680

View file

@ -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():