Bug 30642: DBRev 22.12.00.004
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 10 Feb 2023 15:47:15 +0000 (12:47 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 10 Feb 2023 15:47:15 +0000 (12:47 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha.pm
installer/data/mysql/atomicupdate/bug_30642-add_renewal_type.pl [deleted file]
installer/data/mysql/db_revs/221200004.pl [new file with mode: 0644]

diff --git a/Koha.pm b/Koha.pm
index 0887f96..ad6f182 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 = "22.12.00.003";
+$VERSION = "22.12.00.004";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_30642-add_renewal_type.pl b/installer/data/mysql/atomicupdate/bug_30642-add_renewal_type.pl
deleted file mode 100644 (file)
index 36290b3..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-use Modern::Perl;
-
-return {
-    bug_number => "30642",
-    description => "Record whether a renewal has been done manually or automatically.",
-    up => sub {
-        my ($args) = @_;
-        my ($dbh, $out) = @$args{qw(dbh out)};
-
-        if( !column_exists( 'checkout_renewals', 'renewal_type' ) ) {
-          $dbh->do(q{
-              ALTER TABLE checkout_renewals ADD COLUMN `renewal_type` enum('Automatic', 'Manual') NOT NULL DEFAULT 'Manual' AFTER `timestamp`
-          });
-
-          say $out "Added column 'checkout_renewals.column_name'";
-        }
-    },
-};
\ No newline at end of file
diff --git a/installer/data/mysql/db_revs/221200004.pl b/installer/data/mysql/db_revs/221200004.pl
new file mode 100644 (file)
index 0000000..36290b3
--- /dev/null
@@ -0,0 +1,18 @@
+use Modern::Perl;
+
+return {
+    bug_number => "30642",
+    description => "Record whether a renewal has been done manually or automatically.",
+    up => sub {
+        my ($args) = @_;
+        my ($dbh, $out) = @$args{qw(dbh out)};
+
+        if( !column_exists( 'checkout_renewals', 'renewal_type' ) ) {
+          $dbh->do(q{
+              ALTER TABLE checkout_renewals ADD COLUMN `renewal_type` enum('Automatic', 'Manual') NOT NULL DEFAULT 'Manual' AFTER `timestamp`
+          });
+
+          say $out "Added column 'checkout_renewals.column_name'";
+        }
+    },
+};
\ No newline at end of file