Bug 8995: (QA follow-up) Convert db update to perl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2019-04-25 10:39:14 +01:00 committed by Nick Clemens
parent d99d32d033
commit b46312dde9
2 changed files with 15 additions and 6 deletions

View File

@ -1,6 +0,0 @@
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES
('OpenURLResolverURL', '', 'URL of OpenURL Resolver', NULL, 'Free'),
('OpenURLText', '', 'Text of OpenURL links (or image title if OpenURLImageLocation is defined)', NULL, 'Free'),
('OpenURLImageLocation', '', 'Location of image for OpenURL links', NULL, 'Free'),
('OPACShowOpenURL', '', 'Enable display of OpenURL links in OPAC search results and detail page', NULL, 'YesNo'),
('OPACOpenURLItemTypes', '', 'Show the OpenURL link only for these item types', NULL, 'Free');

View File

@ -0,0 +1,15 @@
$DBversion = 'XXX'; # will be replaced by the RM
if ( CheckVersion($DBversion) ) {
$dbh->do(q{
INSERT IGNORE INTO `systempreferences` (`variable`, `value`, `explanation`, `options`, `type`) VALUES
('OpenURLResolverURL', '', 'URL of OpenURL Resolver', NULL, 'Free'),
('OpenURLText', '', 'Text of OpenURL links (or image title if OpenURLImageLocation is defined)', NULL, 'Free'),
('OpenURLImageLocation', '', 'Location of image for OpenURL links', NULL, 'Free'),
('OPACShowOpenURL', '', 'Enable display of OpenURL links in OPAC search results and detail page', NULL, 'YesNo'),
('OPACOpenURLItemTypes', '', 'Show the OpenURL link only for these item types', NULL, 'Free');
});
SetVersion($DBversion);
print
"Upgrade to $DBversion done (Bug 8995 - Add new preferences for OpenURLResolvers)\n";
}