Merge "Issue multiple SQL statements in separate engine.execute() calls"

This commit is contained in:
Jenkins
2014-08-20 01:38:20 +00:00
committed by Gerrit Code Review

View File

@@ -1536,13 +1536,14 @@ def upgrade(migrate_engine):
refcolumns=fkey_pair[1]) refcolumns=fkey_pair[1])
fkey.create() fkey.create()
if migrate_engine.name == "mysql": if migrate_engine.name == 'mysql':
# In Folsom we explicitly converted migrate_version to UTF8. # In Folsom we explicitly converted migrate_version to UTF8.
sql = "ALTER TABLE migrate_version CONVERT TO CHARACTER SET utf8;" migrate_engine.execute(
'ALTER TABLE migrate_version CONVERT TO CHARACTER SET utf8')
# Set default DB charset to UTF8. # Set default DB charset to UTF8.
sql += "ALTER DATABASE %s DEFAULT CHARACTER SET utf8;" % \ migrate_engine.execute(
migrate_engine.url.database 'ALTER DATABASE %s DEFAULT CHARACTER SET utf8' %
migrate_engine.execute(sql) migrate_engine.url.database)
_create_shadow_tables(migrate_engine) _create_shadow_tables(migrate_engine)