Bug 19719: DBRev 18.06.00.019
authorNick Clemens <nick@bywatersolutions.com>
Wed, 22 Aug 2018 13:57:02 +0000 (13:57 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 22 Aug 2018 13:57:02 +0000 (13:57 +0000)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha.pm
installer/data/mysql/atomicupdate/bug_19719_add_collection_column.sql [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 9932209..2f44de7 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 = "18.06.00.018";
+$VERSION = "18.06.00.019";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_19719_add_collection_column.sql b/installer/data/mysql/atomicupdate/bug_19719_add_collection_column.sql
deleted file mode 100644 (file)
index bbf0a65..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-INSERT INTO columns_settings (module, page, tablename, columnname, cannot_be_toggled, is_hidden) VALUES
-("circ", "circulation", "issues-table", "collection", 0, 1),
-("members", "moremember", "issues-table", "collection", 0, 1);
-
--- Bug 19719: Add collection column to issues table
index 45e89e3..7385875 100755 (executable)
@@ -16284,6 +16284,17 @@ WHERE issues.itemnumber IS NULL
     print "Upgrade to $DBversion done (Bug 20487: Clear items.onloan for unissued items)\n";
 }
 
+$DBversion = '18.06.00.019';
+if( CheckVersion( $DBversion ) ) {
+    $dbh->do( q|
+INSERT IGNORE INTO columns_settings (module, page, tablename, columnname, cannot_be_toggled, is_hidden) VALUES
+("circ", "circulation", "issues-table", "collection", 0, 1),
+("members", "moremember", "issues-table", "collection", 0, 1);
+    |);
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 19719: Default to hiding collection code column)\n";
+}
+
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.