Fixing migration script for upgrade (#417)

selenium-screenshot-testing
Kevin Chung 2017-10-17 23:56:07 -04:00 committed by GitHub
parent 61045a435e
commit cdc7a70fe7
1 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,8 @@ def upgrade():
existing_type=sa.INTEGER(),
type_=sa.String(length=80),
existing_nullable=True)
op.execute("UPDATE `keys` set key_type='static' WHERE key_type=0")
op.execute("UPDATE `keys` set key_type='regex' WHERE key_type=1")
op.execute("UPDATE `keys` set key_type='static' WHERE key_type='0'")
op.execute("UPDATE `keys` set key_type='regex' WHERE key_type='1'")
elif url.startswith('postgres'):
op.alter_column('keys', 'key_type',
existing_type=sa.INTEGER(),