Bug 25655: DBRev 22.12.00.011
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 6 Mar 2023 17:01:15 +0000 (14:01 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 6 Mar 2023 17:01:15 +0000 (14:01 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha.pm
installer/data/mysql/atomicupdate/bug_25655.pl [deleted file]
installer/data/mysql/db_revs/221200011.pl [new file with mode: 0755]

diff --git a/Koha.pm b/Koha.pm
index 8a5dec6..af0100c 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.010";
+$VERSION = "22.12.00.011";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_25655.pl b/installer/data/mysql/atomicupdate/bug_25655.pl
deleted file mode 100755 (executable)
index 01be1a1..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-use Modern::Perl;
-
-return {
-    bug_number => "25655",
-    description => "Store actual cost in foreign currency and currency from the invoices",
-    up => sub {
-        my ($args) = @_;
-        my ($dbh, $out) = @$args{qw(dbh out)};
-        unless ( column_exists('aqorders', 'invoice_unitprice') ) {
-            $dbh->do(q{
-                ALTER TABLE aqorders
-                ADD COLUMN invoice_unitprice decimal(28,6) DEFAULT NULL COMMENT 'the unit price in foreign currency' AFTER estimated_delivery_date
-            });
-        }
-        say $out "Added column 'aqorders.invoice_unitprice'";
-
-        unless ( column_exists('aqorders', 'invoice_currency') ) {
-            $dbh->do(q{
-                ALTER TABLE aqorders
-                ADD COLUMN invoice_currency varchar(10) DEFAULT NULL COMMENT 'the currency of the invoice_unitprice' AFTER invoice_unitprice,
-                ADD CONSTRAINT `aqorders_invoice_currency` FOREIGN KEY (`invoice_currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL
-            });
-        }
-        say $out "Added column 'aqorders.invoice_currency'";
-    },
-};
diff --git a/installer/data/mysql/db_revs/221200011.pl b/installer/data/mysql/db_revs/221200011.pl
new file mode 100755 (executable)
index 0000000..01be1a1
--- /dev/null
@@ -0,0 +1,26 @@
+use Modern::Perl;
+
+return {
+    bug_number => "25655",
+    description => "Store actual cost in foreign currency and currency from the invoices",
+    up => sub {
+        my ($args) = @_;
+        my ($dbh, $out) = @$args{qw(dbh out)};
+        unless ( column_exists('aqorders', 'invoice_unitprice') ) {
+            $dbh->do(q{
+                ALTER TABLE aqorders
+                ADD COLUMN invoice_unitprice decimal(28,6) DEFAULT NULL COMMENT 'the unit price in foreign currency' AFTER estimated_delivery_date
+            });
+        }
+        say $out "Added column 'aqorders.invoice_unitprice'";
+
+        unless ( column_exists('aqorders', 'invoice_currency') ) {
+            $dbh->do(q{
+                ALTER TABLE aqorders
+                ADD COLUMN invoice_currency varchar(10) DEFAULT NULL COMMENT 'the currency of the invoice_unitprice' AFTER invoice_unitprice,
+                ADD CONSTRAINT `aqorders_invoice_currency` FOREIGN KEY (`invoice_currency`) REFERENCES `currency` (`currency`) ON DELETE SET NULL ON UPDATE SET NULL
+            });
+        }
+        say $out "Added column 'aqorders.invoice_currency'";
+    },
+};