Bug 30108: Database revision, adding new preference
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 17 Feb 2022 12:55:20 +0000 (12:55 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 2 May 2022 21:22:58 +0000 (11:22 -1000)
Test plan:
Run upgrade or new install.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/atomicupdate/bug_30108.pl [new file with mode: 0755]
installer/data/mysql/mandatory/sysprefs.sql

diff --git a/installer/data/mysql/atomicupdate/bug_30108.pl b/installer/data/mysql/atomicupdate/bug_30108.pl
new file mode 100755 (executable)
index 0000000..039d5ce
--- /dev/null
@@ -0,0 +1,14 @@
+use Modern::Perl;
+
+return {
+    bug_number => 30108,
+    description => "Add preference OPACMandatoryHoldDates",
+    up => sub {
+        my ($args) = @_;
+        my ($dbh, $out) = @$args{qw(dbh out)};
+        $dbh->do(q{
+INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` ) VALUES
+('OPACMandatoryHoldDates', '', '|start|end|both', 'Define which hold dates are required on OPAC reserve form', 'Choice')
+        });
+    },
+};
index c6d0fd4..aab2210 100644 (file)
@@ -438,6 +438,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('OPACLocalCoverImages','0','1','Display local cover images on OPAC search and details pages.','YesNo'),
 ('OpacLocationBranchToDisplay','holding','holding|home|both','In the OPAC, under location show which branch for Location in the record details.','Choice'),
 ('OpacLocationOnDetail','holding','holding|home|both|column','In the OPAC detail, display the shelving location on its own column or under a library columns.',  'Choice'),
+('OPACMandatoryHoldDates', '', '|start|end|both', 'Define which hold dates are required on OPAC reserve form', 'Choice'),
 ('OpacMaintenance','0','','If ON, enables maintenance warning in OPAC','YesNo'),
 ('OpacMaintenanceNotice','','','A user-defined block of HTML to appear on screen when OpacMaintenace is enabled','Textarea'),
 ('OpacMaxItemsToDisplay','50','','Max items to display at the OPAC on a biblio detail','Integer'),