Fixes medal grades (table was missing).
[platal.git] / upgrade / account / copy_tables.sh
CommitLineData
aa1f260a
FB
1#!/usr/bin/env bash
2
3copyTable() {
4 echo "CREATE TABLE $2 LIKE $1;"
8425f487
FB
5 [[ "$3" == *"no-innodb"* ]] || echo "ALTER TABLE $2 ENGINE = InnoDB;"
6 [[ "$3" == *"no-content"* ]] || echo "INSERT INTO $2 SELECT * FROM $1;"
aa1f260a
FB
7}
8
9
10copyTable '#forums#.list' 'forums'
11copyTable '#forums#.abos' 'forum_subs'
12copyTable '#forums#.innd' 'forum_innd'
13copyTable '#forums#.profils' 'forum_profiles'
14
15copyTable '#logger#.actions' 'log_actions'
16copyTable '#logger#.events' 'log_events'
17copyTable '#logger#.last_sessions' 'log_last_sessions'
18copyTable '#logger#.sessions' 'log_sessions'
19
20copyTable '#paiement#.paiements' 'payments'
21copyTable '#paiement#.codeC' 'payment_codeC'
22copyTable '#paiement#.codeRCB' 'payment_codeRCB'
23copyTable '#paiement#.methodes' 'payment_methods'
24copyTable '#paiement#.transactions' 'payment_transactions'
25
26copyTable '#groupex#.announces' 'group_announces'
27copyTable '#groupex#.announces_photo' 'group_announces_photo'
28copyTable '#groupex#.announces_read' 'group_announces_read'
29copyTable '#groupex#.asso' 'groups'
30copyTable '#groupex#.dom' 'group_dom'
31copyTable '#groupex#.evenements' 'group_events'
32copyTable '#groupex#.evenements_items' 'group_event_items'
33copyTable '#groupex#.evenements_participants' 'group_event_participants'
34copyTable '#groupex#.membres' 'group_members'
35copyTable '#groupex#.membres_sub_requests' 'group_member_sub_requests'
36copyTable '#x4dat#.groupesx_auth' 'group_auth'
37
38copyTable '#x4dat#.axletter' 'axletter'
39copyTable '#x4dat#.axletter_ins' 'axletter_ins'
40copyTable '#x4dat#.axletter_rights' 'axletter_rights'
41
42copyTable '#x4dat#.newsletter' 'newsletter'
43copyTable '#x4dat#.newsletter_art' 'newsletter_art'
44copyTable '#x4dat#.newsletter_cat' 'newsletter_cat'
45copyTable '#x4dat#.newsletter_ins' 'newsletter_ins'
46
47copyTable '#x4dat#.evenements' 'announces'
48copyTable '#x4dat#.evenements_photo' 'announce_photos'
49copyTable '#x4dat#.evenements_vus' 'announce_read'
50
8425f487
FB
51copyTable '#x4dat#.gapps_accounts' 'gapps_accounts' no-innodb
52copyTable '#x4dat#.gapps_nicknames' 'gapps_nicknames' no-innodb
aa1f260a
FB
53copyTable '#x4dat#.gapps_queue' 'gapps_queue'
54copyTable '#x4dat#.gapps_reporting' 'gapps_reporting'
55
56copyTable '#x4dat#.contacts' 'contacts'
57copyTable '#x4dat#.coupures' 'downtimes'
58copyTable '#x4dat#.emails_watch' 'email_watch'
59copyTable '#x4dat#.emails_send_save' 'email_send_save'
60copyTable '#x4dat#.homonymes' 'homonyms'
61copyTable '#x4dat#.ip_watch' 'ip_watch'
62copyTable '#x4dat#.mx_watch' 'mx_watch'
63copyTable '#x4dat#.ml_moderate' 'email_list_moderate'
64
65copyTable '#x4dat#.postfix_blacklist' 'postfix_blacklist'
66copyTable '#x4dat#.postfix_mailseen' 'postfix_mailseen'
67copyTable '#x4dat#.postfix_whitelist' 'postfix_whitelist'
68
69copyTable '#x4dat#.photo' 'profile_photos'
70copyTable '#x4dat#.binets_def' 'profile_binet_enum'
71copyTable '#x4dat#.binets_ins' 'profile_binets'
72copyTable '#x4dat#.sections' 'profile_section_enum'
73copyTable '#x4dat#.profile_medals' 'profile_medal_enum'
74copyTable '#x4dat#.profile_medals_sub' 'profile_medals'
c6d16b24 75copyTable '#x4dat#.profile_medals_grades' 'profile_medal_grade_enum'
aa1f260a
FB
76copyTable '#x4dat#.competences_def' 'profile_skill_enum'
77copyTable '#x4dat#.competences_ins' 'profile_skills'
78copyTable '#x4dat#.langues_def' 'profile_langskill_enum'
79copyTable '#x4dat#.langues_ins' 'profile_langskills'
80
81copyTable '#x4dat#.register_marketing' 'register_marketing'
82copyTable '#x4dat#.register_pending' 'register_pending'
83copyTable '#x4dat#.register_subs' 'register_subs'
84copyTable '#x4dat#.register_mstats' 'register_mstats'
85
86copyTable '#x4dat#.reminder' 'reminder'
87copyTable '#x4dat#.reminder_type' 'reminder_type'
88
89copyTable '#x4dat#.requests' 'requests'
90copyTable '#x4dat#.requests_answers' 'requests_answers'
91copyTable '#x4dat#.requests_hidden' 'requests_hidden'
92
93copyTable '#x4dat#.search_autocomplete' 'search_autocomplete'
94copyTable '#x4dat#.search_name' 'search_name'
95
96copyTable '#x4dat#.skins' 'skins'
da431170 97copyTable '#x4dat#.tips' 'reminder_tips'
aa1f260a
FB
98
99copyTable '#x4dat#.survey_surveys' 'surveys'
100copyTable '#x4dat#.survey_answers' 'survey_answers'
101copyTable '#x4dat#.survey_votes' 'survey_votes'
102
103copyTable '#x4dat#.watch_profile' 'watch_profile'
104copyTable '#x4dat#.perte_pass' 'account_lost_passwords'
105
106copyTable '#x4dat#.emails' 'emails'
107copyTable '#x4dat#.aliases' 'aliases'
108copyTable '#x4dat#.virtual' 'virtual'
109copyTable '#x4dat#.virtual_domains' 'virtual_domains'
110copyTable '#x4dat#.virtual_redirect' 'virtual_redirect'
111
112copyTable '#x4dat#.watch_nonins' 'watch_nonins'
113copyTable '#x4dat#.watch_promo' 'watch_promo'
114
8425f487 115copyTable '#x4dat#.openid_trusted' 'account_auth_openid' no-innodb