Adds script to switch sql engine to InnoDB.
authorStéphane Jacob <sj@m4x.org>
Thu, 21 Oct 2010 07:50:04 +0000 (09:50 +0200)
committerStéphane Jacob <sj@m4x.org>
Thu, 21 Oct 2010 07:50:04 +0000 (09:50 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
upgrade/1.0.1/innodb.sh [new file with mode: 0755]
upgrade/1.0.1/update.sh

diff --git a/upgrade/1.0.1/innodb.sh b/upgrade/1.0.1/innodb.sh
new file mode 100755 (executable)
index 0000000..bb18cb8
--- /dev/null
@@ -0,0 +1,128 @@
+#!/usr/bin/env bash
+
+changeEngine() {
+    echo "ALTER TABLE $1 ENGINE = InnoDB;"
+}
+
+# changeEngine 'account_auth_openid'
+changeEngine 'account_lost_passwords'
+changeEngine 'account_profiles'
+changeEngine 'account_types'
+changeEngine 'accounts'
+changeEngine 'aliases'
+changeEngine 'announce_photos'
+changeEngine 'announce_read'
+changeEngine 'announces'
+changeEngine 'axletter'
+changeEngine 'axletter_ins'
+changeEngine 'axletter_rights'
+changeEngine 'carvas'
+changeEngine 'contacts'
+changeEngine 'downtimes'
+changeEngine 'email_list_moderate'
+changeEngine 'email_options'
+changeEngine 'email_send_save'
+changeEngine 'email_watch'
+changeEngine 'emails'
+changeEngine 'forum_innd'
+changeEngine 'forum_profiles'
+changeEngine 'forum_subs'
+changeEngine 'forums'
+# changeEngine 'gapps_accounts'
+# changeEngine 'gapps_nicknames'
+changeEngine 'gapps_queue'
+changeEngine 'gapps_reporting'
+changeEngine 'geoloc_administrativeareas'
+changeEngine 'geoloc_countries'
+changeEngine 'geoloc_localities'
+changeEngine 'geoloc_subadministrativeareas'
+changeEngine 'group_announces'
+changeEngine 'group_announces_photo'
+changeEngine 'group_announces_read'
+changeEngine 'group_auth'
+changeEngine 'group_dom'
+changeEngine 'group_event_items'
+changeEngine 'group_event_participants'
+changeEngine 'group_events'
+changeEngine 'group_member_sub_requests'
+changeEngine 'group_members'
+changeEngine 'groups'
+changeEngine 'homonyms'
+changeEngine 'ip_watch'
+changeEngine 'log_actions'
+changeEngine 'log_events'
+changeEngine 'log_last_sessions'
+changeEngine 'log_sessions'
+changeEngine 'mx_watch'
+changeEngine 'newsletter'
+changeEngine 'newsletter_art'
+changeEngine 'newsletter_cat'
+changeEngine 'newsletter_ins'
+changeEngine 'payment_bankaccounts'
+changeEngine 'payment_codeC'
+changeEngine 'payment_codeRCB'
+changeEngine 'payment_methods'
+changeEngine 'payment_transactions'
+changeEngine 'payments'
+changeEngine 'postfix_blacklist'
+changeEngine 'postfix_mailseen'
+changeEngine 'postfix_whitelist'
+changeEngine 'profile_addresses'
+changeEngine 'profile_binet_enum'
+changeEngine 'profile_binets'
+changeEngine 'profile_corps'
+changeEngine 'profile_corps_enum'
+changeEngine 'profile_corps_rank_enum'
+changeEngine 'profile_display'
+changeEngine 'profile_education'
+changeEngine 'profile_education_degree'
+changeEngine 'profile_education_degree_enum'
+changeEngine 'profile_education_enum'
+changeEngine 'profile_education_field_enum'
+changeEngine 'profile_job'
+changeEngine 'profile_job_alternates'
+changeEngine 'profile_job_enum'
+changeEngine 'profile_job_sector_enum'
+changeEngine 'profile_job_subsector_enum'
+changeEngine 'profile_job_subsubsector_enum'
+changeEngine 'profile_langskill_enum'
+changeEngine 'profile_langskills'
+changeEngine 'profile_medal_enum'
+changeEngine 'profile_medal_grade_enum'
+changeEngine 'profile_medals'
+changeEngine 'profile_mentor'
+changeEngine 'profile_mentor_country'
+changeEngine 'profile_mentor_sector'
+changeEngine 'profile_name'
+changeEngine 'profile_name_enum'
+changeEngine 'profile_networking'
+changeEngine 'profile_networking_enum'
+changeEngine 'profile_phones'
+changeEngine 'profile_photos'
+changeEngine 'profile_section_enum'
+changeEngine 'profile_skill_enum'
+changeEngine 'profile_skills'
+changeEngine 'profiles'
+changeEngine 'register_marketing'
+changeEngine 'register_mstats'
+changeEngine 'register_pending'
+changeEngine 'register_subs'
+changeEngine 'reminder'
+changeEngine 'reminder_tips'
+changeEngine 'reminder_type'
+changeEngine 'requests'
+changeEngine 'requests_answers'
+changeEngine 'requests_hidden'
+changeEngine 'search_autocomplete'
+changeEngine 'search_name'
+changeEngine 'skins'
+changeEngine 'survey_answers'
+changeEngine 'survey_votes'
+changeEngine 'surveys'
+changeEngine 'virtual'
+changeEngine 'virtual_domains'
+changeEngine 'virtual_redirect'
+changeEngine 'watch'
+changeEngine 'watch_nonins'
+changeEngine 'watch_profile'
+changeEngine 'watch_promo'
index 8368751..40f1278 100755 (executable)
@@ -3,9 +3,13 @@
 . ../inc/pervasive.sh
 
 ###########################################################
-[ "$DATABASE" != "x4dat" ] || die "Cannot target x4dat"
+[ "$DATABASE" != "x5dat" ] || die "Cannot target x5dat"
 copy_db
 
+echo "* switching engines to InnoDB"
+(./innodb.sh | while read line; do mysql_exec "$line"; done) || die "ERROR"
+echo "OK"
+
 confirm "* Running database upgrade scripts"
 mysql_run_directory .