Bug 30642: DBRev 22.12.00.004
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 10 Feb 2023 15:47:15 +0000 (12:47 -0300)
committerJacob O'Mara <jacob.omara@ptfs-europe.com>
Mon, 13 Feb 2023 09:43:33 +0000 (09:43 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 178e40ae9fd7246fa638a64c34fde06f94548ff0)
Signed-off-by: Jacob O'Mara <jacob.omara@ptfs-europe.com>
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/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