7f168defc3e4638dcc33024236b464c3bf65a230
[koha.git] / installer / data / mysql / atomicupdate / bug_21846.perl
1 $DBversion = 'XXX';  # will be replaced by the RM
2 if( CheckVersion( $DBversion ) ) {
3
4     $dbh->do('SET FOREIGN_KEY_CHECKS=0');
5
6     # Change columns accordingly
7     $dbh->do(q{
8         ALTER TABLE tags_index
9             MODIFY COLUMN term VARCHAR(191) COLLATE utf8mb4_bin NOT NULL;
10     });
11
12     $dbh->do(q{
13         ALTER TABLE tags_approval
14             MODIFY COLUMN term VARCHAR(191) COLLATE utf8mb4_bin NOT NULL;
15     });
16
17     $dbh->do(q{
18         ALTER TABLE tags_all
19             MODIFY COLUMN term VARCHAR(191) COLLATE utf8mb4_bin NOT NULL;
20     });
21
22     $dbh->do('SET FOREIGN_KEY_CHECKS=1');
23
24     SetVersion( $DBversion );
25     print "Upgrade to $DBversion done (Bug 21846 - Using emoji as tags has broken weights)\n";
26     my $maintenance_script = C4::Context->config("intranetdir") . "/misc/maintenance/fix_tags_weight.pl";
27     print "WARNING: (Bug 21846) You need to manually run $maintenance_script to fix possible issues with tags.\n";
28 }