Skip to content

Instantly share code, notes, and snippets.

@omega8cc
Created November 16, 2011 12:05
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omega8cc/1369931 to your computer and use it in GitHub Desktop.
Save omega8cc/1369931 to your computer and use it in GitHub Desktop.
cd /path/to/platform/sites/domain.name
drush sql-query "SHOW TABLES" | tail -n +2 | xargs -I '{}' echo "ALTER TABLE {} ENGINE=INNODB;" > alter_table.sql
perl -p -i -e 's/(search_[a-z_]+ ENGINE=)INNODB/\1MYISAM/g' alter_table.sql
cat alter_table.sql | `drush sql-connect`
@jackinloadup
Copy link

Just as a note to people using this. Don't forget to delete the alter_table.sql file.

Works like a charm omega8cc, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment