From 0c4ed27244323f970b8b1e2411844ed85511f01b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 24 Oct 2018 13:22:46 +0000 Subject: [PATCH] Bug 15486: DBRev 18.06.00.043 Signed-off-by: Nick Clemens --- Koha.pm | 2 +- Koha/Schema/Result/Issuingrule.pm | 11 +++++++++-- .../atomicupdate/bug_15486_max_holds_per_day.perl | 14 -------------- installer/data/mysql/updatedatabase.pl | 13 +++++++++++++ 4 files changed, 23 insertions(+), 17 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_15486_max_holds_per_day.perl diff --git a/Koha.pm b/Koha.pm index 5b8d77831f..41e60e75ff 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.042"; +$VERSION = "18.06.00.043"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/Issuingrule.pm b/Koha/Schema/Result/Issuingrule.pm index 5958055104..f1470b9899 100644 --- a/Koha/Schema/Result/Issuingrule.pm +++ b/Koha/Schema/Result/Issuingrule.pm @@ -182,6 +182,11 @@ __PACKAGE__->table("issuingrules"); default_value: 1 is_nullable: 0 +=head2 holds_per_day + + data_type: 'smallint' + is_nullable: 1 + =head2 branchcode data_type: 'varchar' @@ -285,6 +290,8 @@ __PACKAGE__->add_columns( { data_type => "smallint", default_value => 0, is_nullable => 0 }, "holds_per_record", { data_type => "smallint", default_value => 1, is_nullable => 0 }, + "holds_per_day", + { data_type => "smallint", is_nullable => 1 }, "branchcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "overduefinescap", @@ -321,8 +328,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-12-13 12:44:30 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VBD8atc/D/6rN0D+aTaSOQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-24 13:17:50 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hVIiAIZ5ui3ZhLhuVxCzZg # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/installer/data/mysql/atomicupdate/bug_15486_max_holds_per_day.perl b/installer/data/mysql/atomicupdate/bug_15486_max_holds_per_day.perl deleted file mode 100644 index 62ade64c6d..0000000000 --- a/installer/data/mysql/atomicupdate/bug_15486_max_holds_per_day.perl +++ /dev/null @@ -1,14 +0,0 @@ -$DBversion = "XXX"; -if ( CheckVersion($DBversion) ) { - - if ( !column_exists( 'issuingrules', 'holds_per_day' ) ) { - $dbh->do(q{ - ALTER TABLE `issuingrules` - ADD COLUMN `holds_per_day` SMALLINT(6) DEFAULT NULL - AFTER `holds_per_record` - }); - } - - print "Upgrade to $DBversion done (Bug 15486: Restrict number of holds placed by day)\n"; - SetVersion($DBversion); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 692604d438..0731c659a9 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -16678,6 +16678,19 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 21617: Make statistics.ccode longer)\n"; } +$DBversion = "18.06.00.043"; +if ( CheckVersion($DBversion) ) { + if ( !column_exists( 'issuingrules', 'holds_per_day' ) ) { + $dbh->do(q{ + ALTER TABLE `issuingrules` + ADD COLUMN `holds_per_day` SMALLINT(6) DEFAULT NULL + AFTER `holds_per_record` + }); + } + print "Upgrade to $DBversion done (Bug 15486: Restrict number of holds placed by day)\n"; + SetVersion($DBversion); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5