88-- and also we cannot touch book keeping table "schema_version" of flyway,
99-- since it will be in use during the migration.
1010--
11- -- https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
12- -- http://stackoverflow.com/a/766996
13- --
1411
1512LOCK TABLES
1613 address WRITE,
@@ -26,17 +23,41 @@ LOCK TABLES
2623
2724SET FOREIGN_KEY_CHECKS = 0 ;
2825
29- ALTER TABLE address CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
30- ALTER TABLE charge_box CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
31- ALTER TABLE connector CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
32- ALTER TABLE connector_meter_value CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
33- ALTER TABLE connector_status CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
34- ALTER TABLE ocpp_tag CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
35- ALTER TABLE reservation CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
36- ALTER TABLE settings CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
37- ALTER TABLE ` transaction` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
38- ALTER TABLE ` user` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;
26+ ALTER TABLE charge_box CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
27+ ALTER TABLE address CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
28+ ALTER TABLE connector CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
29+ ALTER TABLE connector_meter_value CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
30+ ALTER TABLE connector_status CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
31+ ALTER TABLE ocpp_tag CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
32+ ALTER TABLE reservation CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
33+ ALTER TABLE settings CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
34+ ALTER TABLE ` transaction` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
35+ ALTER TABLE ` user` CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
3936
4037SET FOREIGN_KEY_CHECKS = 1 ;
4138
4239UNLOCK TABLES;
40+
41+ REPAIR TABLE
42+ address,
43+ charge_box,
44+ connector,
45+ connector_meter_value,
46+ connector_status,
47+ ocpp_tag,
48+ reservation,
49+ settings,
50+ ` transaction` ,
51+ ` user` ;
52+
53+ OPTIMIZE TABLE
54+ address,
55+ charge_box,
56+ connector,
57+ connector_meter_value,
58+ connector_status,
59+ ocpp_tag,
60+ reservation,
61+ settings,
62+ ` transaction` ,
63+ ` user` ;
0 commit comments