From bc25e2c1008e322ed446bc79273ff5b90e92578b Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 25 Mar 2020 09:28:16 +0000 Subject: [PATCH] Bug 13881: DBRev 19.12.00.054 Signed-off-by: Martin Renvoize --- Koha.pm | 2 +- .../bug_13881_create_desks_table.perl | 16 ---------------- installer/data/mysql/updatedatabase.pl | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_13881_create_desks_table.perl diff --git a/Koha.pm b/Koha.pm index 4493e677bc..da2820a647 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.12.00.053"; +$VERSION = "19.12.00.054"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_13881_create_desks_table.perl b/installer/data/mysql/atomicupdate/bug_13881_create_desks_table.perl deleted file mode 100644 index 6228d21f51..0000000000 --- a/installer/data/mysql/atomicupdate/bug_13881_create_desks_table.perl +++ /dev/null @@ -1,16 +0,0 @@ -$DBversion = 'XXX'; -if( CheckVersion( $DBversion ) ) { - $dbh->do(qq{ - CREATE TABLE desks ( -- desks available in a library - desk_id int(11) NOT NULL auto_increment, -- unique identifier added by Koha - desk_name varchar(100) NOT NULL default '', -- name of the desk - branchcode varchar(10) NOT NULL, -- library the desk is located at - PRIMARY KEY (desk_id), - KEY `fk_desks_branchcode` (branchcode), - CONSTRAINT `fk_desks_branchcode` FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - - }); - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 13881 - Add desk management)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4aae1adfbe..0f51b288f5 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -21271,6 +21271,22 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 24476, "Allow patrons to opt-out of autorenewal"); } +$DBversion = '19.12.00.054'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(qq{ + CREATE TABLE desks ( -- desks available in a library + desk_id int(11) NOT NULL auto_increment, -- unique identifier added by Koha + desk_name varchar(100) NOT NULL default '', -- name of the desk + branchcode varchar(10) NOT NULL, -- library the desk is located at + PRIMARY KEY (desk_id), + KEY `fk_desks_branchcode` (branchcode), + CONSTRAINT `fk_desks_branchcode` FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + }); + + NewVersion( $DBversion, 13881, "Add desk management"); +} + # 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