From 13f83dc6e3dc5aed5651cedda78eb13e63e8a227 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 12 Sep 2019 16:32:37 +0100 Subject: [PATCH] Bug 15497: DBRev 19.06.00.027 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_15497.perl | 17 ----------------- installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 18 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_15497.perl diff --git a/Koha.pm b/Koha.pm index 49bdef341d..93d85bcde5 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 = "19.06.00.026"; +$VERSION = "19.06.00.027"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_15497.perl b/installer/data/mysql/atomicupdate/bug_15497.perl deleted file mode 100644 index cc187cd7cd..0000000000 --- a/installer/data/mysql/atomicupdate/bug_15497.perl +++ /dev/null @@ -1,17 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - if( !TableExists( 'itemtypes_branches' ) ) { - $dbh->do( " - CREATE TABLE itemtypes_branches( -- association table between authorised_values and branches - itemtype VARCHAR(10) NOT NULL, - branchcode VARCHAR(10) NOT NULL, - FOREIGN KEY (itemtype) REFERENCES itemtypes(itemtype) ON DELETE CASCADE, - FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - "); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 15497 - Add itemtypes_branches table)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e64661a253..f0ecedc55e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -19418,6 +19418,24 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 20691 - Add ability for guarantors to view guarantee's fines in OPAC)\n"; } +$DBversion = '19.06.00.027'; +if( CheckVersion( $DBversion ) ) { + + if( !TableExists( 'itemtypes_branches' ) ) { + $dbh->do( " + CREATE TABLE itemtypes_branches( -- association table between authorised_values and branches + itemtype VARCHAR(10) NOT NULL, + branchcode VARCHAR(10) NOT NULL, + FOREIGN KEY (itemtype) REFERENCES itemtypes(itemtype) ON DELETE CASCADE, + FOREIGN KEY (branchcode) REFERENCES branches(branchcode) ON DELETE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + "); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 15497 - Add itemtypes_branches table)\n"; +} + # 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