Bug 27946: DBRev 21.12.00.011
authorFridolin Somers <fridolin.somers@biblibre.com>
Fri, 28 Jan 2022 20:32:00 +0000 (10:32 -1000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 28 Jan 2022 21:09:07 +0000 (11:09 -1000)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha.pm
installer/data/mysql/atomicupdate/bug_27946.pl [deleted file]
installer/data/mysql/db_revs/211200011.pl [new file with mode: 0755]

diff --git a/Koha.pm b/Koha.pm
index fe6b65c..0b471dd 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 = "21.12.00.010";
+$VERSION = "21.12.00.011";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_27946.pl b/installer/data/mysql/atomicupdate/bug_27946.pl
deleted file mode 100755 (executable)
index 4d3d408..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-use Modern::Perl;
-
-return {
-    bug_number  => "27946",
-    description => "Add article request fees",
-    up          => sub {
-        my ($args) = @_;
-        my ( $dbh, $out ) = @$args{qw(dbh out)};
-
-        if ( !column_exists( 'article_requests', 'debit_id' ) ) {
-
-            $dbh->do(
-                q{
-                ALTER TABLE `article_requests`
-                    ADD COLUMN `debit_id` int(11) NULL DEFAULT NULL COMMENT 'Debit line with cost for article scan request' AFTER `cancellation_reason`
-            }
-            );
-
-            $dbh->do(
-                q{
-                ALTER TABLE `article_requests`
-                    ADD CONSTRAINT `article_requests_ibfk_5` FOREIGN KEY (`debit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE SET NULL ON UPDATE CASCADE
-            }
-            );
-        }
-
-        $dbh->do(
-            q{
-            INSERT IGNORE INTO account_debit_types ( code, description, can_be_invoiced, can_be_sold, default_amount, is_system )
-            VALUES ('ARTICLE_REQUEST', 'Article request fee', 0, 0, NULL, 1);
-        }
-        );
-    },
-};
diff --git a/installer/data/mysql/db_revs/211200011.pl b/installer/data/mysql/db_revs/211200011.pl
new file mode 100755 (executable)
index 0000000..4d3d408
--- /dev/null
@@ -0,0 +1,34 @@
+use Modern::Perl;
+
+return {
+    bug_number  => "27946",
+    description => "Add article request fees",
+    up          => sub {
+        my ($args) = @_;
+        my ( $dbh, $out ) = @$args{qw(dbh out)};
+
+        if ( !column_exists( 'article_requests', 'debit_id' ) ) {
+
+            $dbh->do(
+                q{
+                ALTER TABLE `article_requests`
+                    ADD COLUMN `debit_id` int(11) NULL DEFAULT NULL COMMENT 'Debit line with cost for article scan request' AFTER `cancellation_reason`
+            }
+            );
+
+            $dbh->do(
+                q{
+                ALTER TABLE `article_requests`
+                    ADD CONSTRAINT `article_requests_ibfk_5` FOREIGN KEY (`debit_id`) REFERENCES `accountlines` (`accountlines_id`) ON DELETE SET NULL ON UPDATE CASCADE
+            }
+            );
+        }
+
+        $dbh->do(
+            q{
+            INSERT IGNORE INTO account_debit_types ( code, description, can_be_invoiced, can_be_sold, default_amount, is_system )
+            VALUES ('ARTICLE_REQUEST', 'Article request fee', 0, 0, NULL, 1);
+        }
+        );
+    },
+};