Skip to content

Instantly share code, notes, and snippets.

@rodm
Created August 23, 2014 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodm/3f81c1b7e8c3b904bfd7 to your computer and use it in GitHub Desktop.
Save rodm/3f81c1b7e8c3b904bfd7 to your computer and use it in GitHub Desktop.
MySQL database engine fix for TeamCity
#!/bin/sh
SCHEMA=teamcity
echo "use $SCHEMA" > fix.sql
mysql --skip-column-names -u root -p >> fix.sql <<EOF
select concat('alter table ', TABLE_NAME, ' engine=InnoDB;') from information_schema.tables where table_schema = '$SCHEMA' and engine = 'MyISAM';
EOF
cat fix.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment