Skip to content

Instantly share code, notes, and snippets.

@emre
Last active December 18, 2015 21:48
Show Gist options
  • Save emre/5849778 to your computer and use it in GitHub Desktop.
Save emre/5849778 to your computer and use it in GitHub Desktop.
converts all the table engine definitions to INNODB
from lurker.connection import Connection
connection = Connection().quick_connect("friendly", "friendly", "friendly", "localhost")
tables = connection.get_results("SHOW TABLES")
for table in tables:
print table.get("Tables_in_mondotv")
connection.execute("ALTER TABLE {0} ENGINE=INNODB;".format(table.get("Tables_in_mondotv")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment