From 3d462af21f3c13312b0ffb8496e55d277f703ebd Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 15 Mar 2019 12:32:49 +0000 Subject: [PATCH] Bug 21846: DBRev 18.12.00.025 Signed-off-by: Nick Clemens --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_21846.perl | 28 ------------------ installer/data/mysql/updatedatabase.pl | 29 +++++++++++++++++++ 3 files changed, 30 insertions(+), 29 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_21846.perl diff --git a/Koha.pm b/Koha.pm index 1d4d38e3f9..e8a639b0f9 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "18.12.00.024"; +$VERSION = "18.12.00.025"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_21846.perl b/installer/data/mysql/atomicupdate/bug_21846.perl deleted file mode 100644 index 7f168defc3..0000000000 --- a/installer/data/mysql/atomicupdate/bug_21846.perl +++ /dev/null @@ -1,28 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - $dbh->do('SET FOREIGN_KEY_CHECKS=0'); - - # Change columns accordingly - $dbh->do(q{ - ALTER TABLE tags_index - MODIFY COLUMN term VARCHAR(191) COLLATE utf8mb4_bin NOT NULL; - }); - - $dbh->do(q{ - ALTER TABLE tags_approval - MODIFY COLUMN term VARCHAR(191) COLLATE utf8mb4_bin NOT NULL; - }); - - $dbh->do(q{ - ALTER TABLE tags_all - MODIFY COLUMN term VARCHAR(191) COLLATE utf8mb4_bin NOT NULL; - }); - - $dbh->do('SET FOREIGN_KEY_CHECKS=1'); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 21846 - Using emoji as tags has broken weights)\n"; - my $maintenance_script = C4::Context->config("intranetdir") . "/misc/maintenance/fix_tags_weight.pl"; - print "WARNING: (Bug 21846) You need to manually run $maintenance_script to fix possible issues with tags.\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 1298e454c0..f5415fc793 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -17690,6 +17690,35 @@ if ( CheckVersion($DBversion) ) { "Upgrade to $DBversion done (Bug 22368 - Add missing constraints to suggestions)\n"; } +$DBversion = '18.12.00.025'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do('SET FOREIGN_KEY_CHECKS=0'); + + # Change columns accordingly + $dbh->do(q{ + ALTER TABLE tags_index + MODIFY COLUMN term VARCHAR(191) COLLATE utf8mb4_bin NOT NULL; + }); + + $dbh->do(q{ + ALTER TABLE tags_approval + MODIFY COLUMN term VARCHAR(191) COLLATE utf8mb4_bin NOT NULL; + }); + + $dbh->do(q{ + ALTER TABLE tags_all + MODIFY COLUMN term VARCHAR(191) COLLATE utf8mb4_bin NOT NULL; + }); + + $dbh->do('SET FOREIGN_KEY_CHECKS=1'); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 21846 - Using emoji as tags has broken weights)\n"; + my $maintenance_script = C4::Context->config("intranetdir") . "/misc/maintenance/fix_tags_weight.pl"; + print "WARNING: (Bug 21846) You need to manually run $maintenance_script to fix possible issues with tags.\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5