Bug 17355: DBRev 19.12.00.083
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 4 May 2020 06:46:00 +0000 (07:46 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 4 May 2020 06:57:22 +0000 (07:57 +0100)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

diff --git a/Koha.pm b/Koha.pm
index 2a4f761..28365c8 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.082";
+$VERSION = "19.12.00.083";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_17355.perl b/installer/data/mysql/atomicupdate/bug_17355.perl
deleted file mode 100644 (file)
index 5720f28..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-$DBversion = 'XXX'; # will be replaced by the RM
-if( CheckVersion( $DBversion ) ) {
-
-    unless ( column_exists( 'authorised_value_categories', 'is_system' ) ) {
-        $dbh->do(q|
-            ALTER TABLE authorised_value_categories
-            ADD COLUMN is_system TINYINT(1) DEFAULT 0 AFTER category_name
-        |);
-    }
-
-    $dbh->do(q|
-        UPDATE authorised_value_categories
-        SET is_system = 1
-        WHERE category_name IN ('LOC', 'LOST', 'WITHDRAWN', 'Bsort1', 'Bsort2', 'Asort1', 'Asort2', 'SUGGEST', 'DAMAGED', 'LOST', 'BOR_NOTES', 'CCODE', 'NOT_LOAN')
-    |);
-
-    $dbh->do(q|
-        UPDATE authorised_value_categories
-        SET is_system = 1
-        WHERE category_name IN ('branches', 'itemtypes', 'cn_source')
-    |);
-
-    # Always end with this (adjust the bug info)
-    NewVersion( $DBversion, 17355, "Add is_system to authorised_value_categories table");
-}
index a4b7184..042185a 100755 (executable)
@@ -21941,6 +21941,32 @@ if( CheckVersion( $DBversion ) ) {
     NewVersion( $DBversion, 23794, \@detail);
 }
 
+$DBversion = '19.12.00.083';
+if( CheckVersion( $DBversion ) ) {
+
+    unless ( column_exists( 'authorised_value_categories', 'is_system' ) ) {
+        $dbh->do(q|
+            ALTER TABLE authorised_value_categories
+            ADD COLUMN is_system TINYINT(1) DEFAULT 0 AFTER category_name
+        |);
+    }
+
+    $dbh->do(q|
+        UPDATE authorised_value_categories
+        SET is_system = 1
+        WHERE category_name IN ('LOC', 'LOST', 'WITHDRAWN', 'Bsort1', 'Bsort2', 'Asort1', 'Asort2', 'SUGGEST', 'DAMAGED', 'LOST', 'BOR_NOTES', 'CCODE', 'NOT_LOAN')
+    |);
+
+    $dbh->do(q|
+        UPDATE authorised_value_categories
+        SET is_system = 1
+        WHERE category_name IN ('branches', 'itemtypes', 'cn_source')
+    |);
+
+    # Always end with this (adjust the bug info)
+    NewVersion( $DBversion, 17355, "Add is_system to authorised_value_categories table");
+}
+
 # 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/';