Bug 13881: DBRev 19.12.00.054
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 25 Mar 2020 09:28:16 +0000 (09:28 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 25 Mar 2020 09:29:46 +0000 (09:29 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha.pm
installer/data/mysql/atomicupdate/bug_13881_create_desks_table.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 4493e67..da2820a 100644 (file)
--- 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 (file)
index 6228d21..0000000
+++ /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";
-}
index 4aae1ad..0f51b28 100755 (executable)
@@ -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/';