From e67c20260948ea974a828ec99a77b9840bbddec7 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 2 Nov 2016 10:53:35 +0000 Subject: [PATCH] Bug 15581 - DBRev 16.06.00.046 Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- Koha/Schema/Result/Issuingrule.pm | 11 +++++++++-- installer/data/mysql/atomicupdate/bug_15581.sql | 1 - installer/data/mysql/updatedatabase.pl | 10 ++++++++++ 4 files changed, 20 insertions(+), 4 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_15581.sql diff --git a/Koha.pm b/Koha.pm index 22a78b384b..c5a3db000c 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 = "16.06.00.045"; +$VERSION = "16.06.00.046"; sub version { return $VERSION; diff --git a/Koha/Schema/Result/Issuingrule.pm b/Koha/Schema/Result/Issuingrule.pm index 28dc795dd1..62f35f2339 100644 --- a/Koha/Schema/Result/Issuingrule.pm +++ b/Koha/Schema/Result/Issuingrule.pm @@ -153,6 +153,11 @@ __PACKAGE__->table("issuingrules"); default_value: 0 is_nullable: 1 +=head2 no_auto_renewal_after + + data_type: 'integer' + is_nullable: 1 + =head2 reservesallowed data_type: 'smallint' @@ -258,6 +263,8 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 1 }, "auto_renew", { data_type => "tinyint", default_value => 0, is_nullable => 1 }, + "no_auto_renewal_after", + { data_type => "integer", is_nullable => 1 }, "reservesallowed", { data_type => "smallint", default_value => 0, is_nullable => 0 }, "holds_per_record", @@ -298,8 +305,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-10-24 13:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eUHth1uaatT2fzY2bihv3g +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-11-02 10:33:37 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:t9AhZLbm4SE7mx25LAyhGA # 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_15581.sql b/installer/data/mysql/atomicupdate/bug_15581.sql deleted file mode 100644 index 854896870f..0000000000 --- a/installer/data/mysql/atomicupdate/bug_15581.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE issuingrules ADD COLUMN no_auto_renewal_after INT(4) DEFAULT NULL AFTER auto_renew; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9fbc16faaa..a9927a3294 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -13599,6 +13599,16 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = '16.06.00.046'; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + ALTER TABLE issuingrules ADD COLUMN no_auto_renewal_after INT(4) DEFAULT NULL AFTER auto_renew; + }); + + print "Upgrade to $DBversion done (Bug 15581 - Add a circ rule to not allow auto-renewals after defined loan period)\n"; + SetVersion($DBversion); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5