Fixes medal grades (table was missing).
[platal.git] / upgrade / account / copy_tables.sh
index 8f026c3..c043d72 100755 (executable)
@@ -2,10 +2,8 @@
 
 copyTable() {
     echo "CREATE TABLE $2 LIKE $1;"
-    if [ -z "$3" ] ; then
-        echo "ALTER TABLE $2 ENGINE = InnoDB;"
-    fi
-    echo "INSERT INTO $2 SELECT * FROM $1;"
+    [[ "$3" == *"no-innodb"* ]] || echo "ALTER TABLE $2 ENGINE = InnoDB;"
+    [[ "$3" == *"no-content"* ]] || echo "INSERT INTO $2 SELECT * FROM $1;"
 }
 
 
@@ -50,8 +48,8 @@ copyTable '#x4dat#.evenements' 'announces'
 copyTable '#x4dat#.evenements_photo' 'announce_photos'
 copyTable '#x4dat#.evenements_vus' 'announce_read'
 
-copyTable '#x4dat#.gapps_accounts' 'gapps_accounts' 'false'
-copyTable '#x4dat#.gapps_nicknames' 'gapps_nicknames' 'false'
+copyTable '#x4dat#.gapps_accounts' 'gapps_accounts' no-innodb
+copyTable '#x4dat#.gapps_nicknames' 'gapps_nicknames' no-innodb
 copyTable '#x4dat#.gapps_queue' 'gapps_queue'
 copyTable '#x4dat#.gapps_reporting' 'gapps_reporting'
 
@@ -74,6 +72,7 @@ copyTable '#x4dat#.binets_ins' 'profile_binets'
 copyTable '#x4dat#.sections' 'profile_section_enum'
 copyTable '#x4dat#.profile_medals' 'profile_medal_enum'
 copyTable '#x4dat#.profile_medals_sub' 'profile_medals'
+copyTable '#x4dat#.profile_medals_grades' 'profile_medal_grade_enum'
 copyTable '#x4dat#.competences_def' 'profile_skill_enum'
 copyTable '#x4dat#.competences_ins' 'profile_skills'
 copyTable '#x4dat#.langues_def' 'profile_langskill_enum'
@@ -95,7 +94,7 @@ copyTable '#x4dat#.search_autocomplete' 'search_autocomplete'
 copyTable '#x4dat#.search_name' 'search_name'
 
 copyTable '#x4dat#.skins' 'skins'
-copyTable '#x4dat#.tips' 'tips'
+copyTable '#x4dat#.tips' 'reminder_tips'
 
 copyTable '#x4dat#.survey_surveys' 'surveys'
 copyTable '#x4dat#.survey_answers' 'survey_answers'
@@ -113,4 +112,4 @@ copyTable '#x4dat#.virtual_redirect' 'virtual_redirect'
 copyTable '#x4dat#.watch_nonins' 'watch_nonins'
 copyTable '#x4dat#.watch_promo' 'watch_promo'
 
-copyTable '#x4dat#.openid_trusted' 'account_auth_openid' 'false'
+copyTable '#x4dat#.openid_trusted' 'account_auth_openid' no-innodb