From aa4d328a3bbe1971a3c4aec9adf8468ce4dbb5c8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 12 Apr 2018 10:48:17 -0300 Subject: [PATCH] Bug 9701: DBRev 17.12.00.028 Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../bug_9701-add_default_indicators.sql | 3 --- installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql diff --git a/Koha.pm b/Koha.pm index 1b0ee8aa3d..63766c6974 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 = "17.12.00.027"; +$VERSION = "17.12.00.028"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql b/installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql deleted file mode 100644 index 7cccd91fad..0000000000 --- a/installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE marc_tag_structure -ADD COLUMN ind2_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorised_value, -ADD COLUMN ind1_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorised_value; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index f83597c6a2..02cb29f308 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15704,7 +15704,7 @@ if( CheckVersion( $DBversion ) ) { }); SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 15492: Add a standalone self-checkin module)\n"; + print "Upgrade to $DBversion done (Bug 15492 - Add a standalone self-checkin module)\n"; } $DBversion = '17.12.00.025'; @@ -15732,7 +15732,7 @@ if( CheckVersion( $DBversion ) ) { } SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 19804: Add issuingrules.suspension_chargeperiod)\n"; + print "Upgrade to $DBversion done (Bug 19804 - Add issuingrules.suspension_chargeperiod)\n"; } $DBversion = '17.12.00.027'; @@ -15746,6 +15746,20 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 19289 - Add system preference UseACQFrameworkForBiblioRecords)\n"; } +$DBversion = '17.12.00.028'; +if( CheckVersion( $DBversion ) ) { + if( !column_exists( 'marc_tag_structure', 'ind1_defaultvalue' ) ) { + $dbh->do(q| + ALTER TABLE marc_tag_structure + ADD COLUMN ind2_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorised_value, + ADD COLUMN ind1_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorised_value; + |); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 9701 - Add default indicators (marc_tag_structure.indX_defaultvalue))\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.2