Merge "Modify the execution of alter_enum_add_value SQL"

This commit is contained in:
Jenkins 2017-07-05 05:44:00 +00:00 committed by Gerrit Code Review
commit df762b0d46

View File

@ -124,7 +124,7 @@ def alter_enum_add_value(table, column, new_value, enum, nullable):
if engine.name == 'postgresql':
values = {'value': new_value,
'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:
op.alter_column(table, column, type_=enum,
existing_nullable=nullable)