mirror of https://github.com/JohnHammond/CTFd.git
Fixing migration script for upgrade (#417)
parent
61045a435e
commit
cdc7a70fe7
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue