Bug 15581 - DBRev 16.06.00.046
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 2 Nov 2016 10:53:35 +0000 (10:53 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Wed, 2 Nov 2016 10:53:35 +0000 (10:53 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Koha.pm
Koha/Schema/Result/Issuingrule.pm
installer/data/mysql/atomicupdate/bug_15581.sql [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 22a78b3..c5a3db0 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 = "16.06.00.045";
+$VERSION = "16.06.00.046";
 
 sub version {
     return $VERSION;
index 28dc795..62f35f2 100644 (file)
@@ -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 (file)
index 8548968..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE issuingrules ADD COLUMN no_auto_renewal_after INT(4) DEFAULT NULL AFTER auto_renew;
index 9fbc16f..a9927a3 100755 (executable)
@@ -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.