Bug 5087: DBRev 20.06.00.011
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 23 Jul 2020 08:32:09 +0000 (10:32 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 23 Jul 2020 09:17:27 +0000 (11:17 +0200)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Koha.pm
installer/data/mysql/atomicupdate/bug_5087_-_add_opac_option_field_to_export_formats.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index b7b3b34..8845b91 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 = "20.06.00.010";
+$VERSION = "20.06.00.011";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_5087_-_add_opac_option_field_to_export_formats.perl b/installer/data/mysql/atomicupdate/bug_5087_-_add_opac_option_field_to_export_formats.perl
deleted file mode 100644 (file)
index 41ee945..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-$DBversion = 'XXX';
-if( CheckVersion( $DBversion ) ) {
-    unless( column_exists( 'export_format', 'staff_only' ) ) {
-        $dbh->do(q|
-            ALTER TABLE export_format
-                ADD staff_only TINYINT(1) NOT NULL DEFAULT 0 AFTER used_for,
-                ADD KEY `staff_only_idx` (`staff_only`);
-        |);
-    }
-
-    unless ( index_exists( 'export_format', 'used_for_idx' ) ) {
-        $dbh->do(q|
-            ALTER TABLE export_format
-                ADD KEY `used_for_idx` (`used_for` (191));
-        |);
-    }
-
-    NewVersion( $DBversion, 5087, "Add export_format.staff_only" );
-}
index 348b797..e2877ea 100755 (executable)
@@ -22356,6 +22356,26 @@ if( CheckVersion( $DBversion ) ) {
     NewVersion( $DBversion, 20815, "Add NoRefundOnLostReturnedItemsAge system preference" );
 }
 
+$DBversion = '20.06.00.011';
+if( CheckVersion( $DBversion ) ) {
+    unless( column_exists( 'export_format', 'staff_only' ) ) {
+        $dbh->do(q|
+            ALTER TABLE export_format
+                ADD staff_only TINYINT(1) NOT NULL DEFAULT 0 AFTER used_for,
+                ADD KEY `staff_only_idx` (`staff_only`);
+        |);
+    }
+
+    unless ( index_exists( 'export_format', 'used_for_idx' ) ) {
+        $dbh->do(q|
+            ALTER TABLE export_format
+                ADD KEY `used_for_idx` (`used_for` (191));
+        |);
+    }
+
+    NewVersion( $DBversion, 5087, "Add export_format.staff_only" );
+}
+
 # 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/';