From 3006eb144ce2af13c5317bcc835b8874e0b44216 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 16 Nov 2020 19:10:46 +0000 Subject: [PATCH] Bug 26853: DBRev 20.05.05.003 Signed-off-by: Lucas Gass --- Koha.pm | 2 +- .../001-26853-update-import_biblios.perl | 15 --------------- installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 16 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/001-26853-update-import_biblios.perl diff --git a/Koha.pm b/Koha.pm index 09942330cb..3b53ed8758 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 = "20.05.05.002"; +$VERSION = "20.05.05.003"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/001-26853-update-import_biblios.perl b/installer/data/mysql/atomicupdate/001-26853-update-import_biblios.perl deleted file mode 100644 index b76413c445..0000000000 --- a/installer/data/mysql/atomicupdate/001-26853-update-import_biblios.perl +++ /dev/null @@ -1,15 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - $dbh->do("DROP INDEX title ON import_biblios"); - $dbh->do("DROP INDEX isbn ON import_biblios"); - $dbh->do("ALTER TABLE import_biblios MODIFY title LONGTEXT"); - $dbh->do("ALTER TABLE import_biblios MODIFY author LONGTEXT"); - $dbh->do("ALTER TABLE import_biblios MODIFY isbn LONGTEXT"); - $dbh->do("ALTER TABLE import_biblios MODIFY issn LONGTEXT"); - $dbh->do("CREATE INDEX title ON import_biblios (title(191));"); - $dbh->do("CREATE INDEX isbn ON import_biblios (isbn(191));"); - - # Always end with this (adjust the bug info) - NewVersion( $DBversion, 26853, "Update import_biblios columns and indexes"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3ff65b5441..b3a00f8d87 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22476,6 +22476,22 @@ if( CheckVersion( $DBversion ) ) { } +$DBversion = '20.05.05.003'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do("DROP INDEX title ON import_biblios"); + $dbh->do("DROP INDEX isbn ON import_biblios"); + $dbh->do("ALTER TABLE import_biblios MODIFY title LONGTEXT"); + $dbh->do("ALTER TABLE import_biblios MODIFY author LONGTEXT"); + $dbh->do("ALTER TABLE import_biblios MODIFY isbn LONGTEXT"); + $dbh->do("ALTER TABLE import_biblios MODIFY issn LONGTEXT"); + $dbh->do("CREATE INDEX title ON import_biblios (title(191));"); + $dbh->do("CREATE INDEX isbn ON import_biblios (isbn(191));"); + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 26853, "Update import_biblios columns and indexes"); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5