Modify the execution of alter_enum_add_value SQL
'%' (value) s in the execution SQL statement of alter_enum_add_value should be decorated with ' ' Ralated commit I4767222ba97d9c35c011adfc187b2977975f981a Change-Id: I24138e5b4ec8b3c3126ae5ff79e26ecb91a65d69
This commit is contained in:
parent
1245b3c4a0
commit
4e1fd1a62b
@ -124,7 +124,7 @@ def alter_enum_add_value(table, column, new_value, enum, nullable):
|
|||||||
if engine.name == 'postgresql':
|
if engine.name == 'postgresql':
|
||||||
values = {'value': new_value,
|
values = {'value': new_value,
|
||||||
'name': enum.name}
|
'name': enum.name}
|
||||||
op.execute("ALTER TYPE %(name)s ADD VALUE %(value)s" % values)
|
op.execute("ALTER TYPE %(name)s ADD VALUE '%(value)s'" % values)
|
||||||
else:
|
else:
|
||||||
op.alter_column(table, column, type_=enum,
|
op.alter_column(table, column, type_=enum,
|
||||||
existing_nullable=nullable)
|
existing_nullable=nullable)
|
||||||
|
Loading…
Reference in New Issue
Block a user