From a11b1083bff404b57f3ac959489f0a2b7a94f6e1 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 22 Aug 2018 13:57:02 +0000 Subject: [PATCH] Bug 19719: DBRev 18.06.00.019 Signed-off-by: Nick Clemens --- Koha.pm | 2 +- .../atomicupdate/bug_19719_add_collection_column.sql | 5 ----- installer/data/mysql/updatedatabase.pl | 11 +++++++++++ 3 files changed, 12 insertions(+), 6 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_19719_add_collection_column.sql diff --git a/Koha.pm b/Koha.pm index 9932209a3f..2f44de7f0c 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 = "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 index bbf0a65a90..0000000000 --- a/installer/data/mysql/atomicupdate/bug_19719_add_collection_column.sql +++ /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 diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 45e89e3dfa..7385875f9d 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -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. -- 2.39.5