Merge "db: Replace use of Connection.execute"
This commit is contained in:
commit
bd786113ce
@ -919,19 +919,19 @@ def upgrade():
|
||||
"image_volume_cache_entries",
|
||||
]
|
||||
|
||||
connection.execute("SET foreign_key_checks = 0")
|
||||
op.execute("SET foreign_key_checks = 0")
|
||||
|
||||
for table in tables:
|
||||
connection.execute(
|
||||
op.execute(
|
||||
"ALTER TABLE %s CONVERT TO CHARACTER SET utf8" % table
|
||||
)
|
||||
|
||||
connection.execute("SET foreign_key_checks = 1")
|
||||
connection.execute(
|
||||
op.execute("SET foreign_key_checks = 1")
|
||||
op.execute(
|
||||
"ALTER DATABASE %s DEFAULT CHARACTER SET utf8"
|
||||
% connection.engine.url.database
|
||||
)
|
||||
connection.execute("ALTER TABLE %s Engine=InnoDB" % table)
|
||||
op.execute("ALTER TABLE %s Engine=InnoDB" % table)
|
||||
|
||||
# This is only necessary for mysql, and since the table is not in use this
|
||||
# will only be a schema update.
|
||||
|
Loading…
Reference in New Issue
Block a user