View | Details | Raw Unified | Return to bug 40405
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_40405.pl (+30 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "40405",
6
    description => "Set systempreferences.value to NOT NULL",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        my $modified = $dbh->do(
12
            q{
13
            UPDATE systempreferences
14
            SET value=""
15
            WHERE value IS NULL
16
        }
17
        );
18
19
        if ( $modified ne "0E0" ) {
20
            say $out sprintf "Adjusted %s systempreference's value to an empty string", $modified;
21
        }
22
23
        $dbh->do(
24
            q{
25
            ALTER TABLE systempreferences
26
            MODIFY COLUMN `value` mediumtext NOT NULL DEFAULT '' COMMENT 'system preference values'
27
        }
28
        );
29
    },
30
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 6368-6374 DROP TABLE IF EXISTS `systempreferences`; Link Here
6368
/*!40101 SET character_set_client = utf8mb4 */;
6368
/*!40101 SET character_set_client = utf8mb4 */;
6369
CREATE TABLE `systempreferences` (
6369
CREATE TABLE `systempreferences` (
6370
  `variable` varchar(50) NOT NULL DEFAULT '' COMMENT 'system preference name',
6370
  `variable` varchar(50) NOT NULL DEFAULT '' COMMENT 'system preference name',
6371
  `value` mediumtext DEFAULT NULL COMMENT 'system preference values',
6371
  `value` mediumtext NOT NULL DEFAULT '' COMMENT 'system preference values',
6372
  `options` longtext DEFAULT NULL COMMENT 'options for multiple choice system preferences',
6372
  `options` longtext DEFAULT NULL COMMENT 'options for multiple choice system preferences',
6373
  `explanation` mediumtext DEFAULT NULL COMMENT 'descriptive text for the system preference',
6373
  `explanation` mediumtext DEFAULT NULL COMMENT 'descriptive text for the system preference',
6374
  `type` varchar(20) DEFAULT NULL COMMENT 'type of question this preference asks (multiple choice, plain text, yes or no, etc)',
6374
  `type` varchar(20) DEFAULT NULL COMMENT 'type of question this preference asks (multiple choice, plain text, yes or no, etc)',
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-12 / +11 lines)
Lines 194-202 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
194
('DebugLevel','2','0|1|2','Define the level of debugging information sent to the browser when errors are encountered (set to 0 in production). 0=none, 1=some, 2=most','Choice'),
194
('DebugLevel','2','0|1|2','Define the level of debugging information sent to the browser when errors are encountered (set to 0 in production). 0=none, 1=some, 2=most','Choice'),
195
('decreaseLoanHighHolds','0','','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'),
195
('decreaseLoanHighHolds','0','','Decreases the loan period for items with number of holds above the threshold specified in decreaseLoanHighHoldsValue','YesNo'),
196
('decreaseLoanHighHoldsControl', 'static', 'static|dynamic', "Chooses between static and dynamic high holds checking", 'Choice'),
196
('decreaseLoanHighHoldsControl', 'static', 'static|dynamic', "Chooses between static and dynamic high holds checking", 'Choice'),
197
('decreaseLoanHighHoldsDuration',NULL,'','Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds','Integer'),
197
('decreaseLoanHighHoldsDuration','','','Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds','Integer'),
198
('decreaseLoanHighHoldsIgnoreStatuses', '', 'damaged|itemlost|notforloan|withdrawn', "Ignore items with these statuses for dynamic high holds checking", 'Choice'),
198
('decreaseLoanHighHoldsIgnoreStatuses', '', 'damaged|itemlost|notforloan|withdrawn', "Ignore items with these statuses for dynamic high holds checking", 'Choice'),
199
('decreaseLoanHighHoldsValue',NULL,'','Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)','Integer'),
199
('decreaseLoanHighHoldsValue','','','Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)','Integer'),
200
('DefaultAuthorityTab','0','0|1|2|3|4|5|6|7|8|9','Default tab to shwo when displaying authorities','Choice'),
200
('DefaultAuthorityTab','0','0|1|2|3|4|5|6|7|8|9','Default tab to shwo when displaying authorities','Choice'),
201
('DefaultClassificationSource','ddc',NULL,'Default classification scheme used by the collection. E.g., Dewey, LCC, etc.','ClassSources'),
201
('DefaultClassificationSource','ddc',NULL,'Default classification scheme used by the collection. E.g., Dewey, LCC, etc.','ClassSources'),
202
('DefaultCountryField008','','','Fill in the default country code for field 008 Range 15-17 of MARC21 - Place of publication, production, or execution. See <a href=\"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>','Free'),
202
('DefaultCountryField008','','','Fill in the default country code for field 008 Range 15-17 of MARC21 - Place of publication, production, or execution. See <a href=\"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>','Free'),
Lines 327-343 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
327
('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
327
('IdRef','0','','Disable/enable the IdRef webservice from the OPAC detail page.','YesNo'),
328
('ILLCheckAvailability', 0, '', 'If ON, during the ILL request process third party sources will be checked for current availability', 'YesNo'),
328
('ILLCheckAvailability', 0, '', 'If ON, during the ILL request process third party sources will be checked for current availability', 'YesNo'),
329
('ILLDefaultStaffEmail', '', NULL, 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', 'Free'),
329
('ILLDefaultStaffEmail', '', NULL, 'Fallback email address for staff ILL notices to be sent to in the absence of a branch address', 'Free'),
330
('ILLHiddenRequestStatuses', NULL, NULL, 'ILL statuses that are considered finished and should not be displayed in the ILL module', 'multiple'),
330
('ILLHiddenRequestStatuses', '', NULL, 'ILL statuses that are considered finished and should not be displayed in the ILL module', 'multiple'),
331
('ILLHistoryCheck', 0, '', 'If ON, a verification is performed to check if the ILL request has previously been placed by the same patron. Verification is done using one of the following identifier fields: DOI, Pubmed ID or ISBN', 'YesNo'),
331
('ILLHistoryCheck', 0, '', 'If ON, a verification is performed to check if the ILL request has previously been placed by the same patron. Verification is done using one of the following identifier fields: DOI, Pubmed ID or ISBN', 'YesNo'),
332
('IllLog', 0, '', 'If ON, log information about ILL requests', 'YesNo'),
332
('IllLog', 0, '', 'If ON, log information about ILL requests', 'YesNo'),
333
('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'),
333
('ILLModule','0','If ON, enables the interlibrary loans module.','','YesNo'),
334
('ILLModuleDisclaimerByType','','','YAML defining disclaimer settings for each ILL request type','Textarea'),
334
('ILLModuleDisclaimerByType','','','YAML defining disclaimer settings for each ILL request type','Textarea'),
335
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
335
('ILLModuleUnmediated','0','','If enabled, try to immediately progress newly placed ILL requests.','YesNo'),
336
('ILLOpacbackends',NULL,NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
336
('ILLOpacbackends','',NULL,'ILL backends to enabled for OPAC initiated requests','multiple'),
337
('ILLOpacUnauthenticatedRequest',NULL,NULL,'Can OPAC users place ILL requests without having to be logged in','YesNo'),
337
('ILLOpacUnauthenticatedRequest',NULL,NULL,'Can OPAC users place ILL requests without having to be logged in','YesNo'),
338
('ILLPartnerCode','IL','','Patrons from this patron category will be used as partners to place ILL requests with','free'),
338
('ILLPartnerCode','IL','','Patrons from this patron category will be used as partners to place ILL requests with','free'),
339
('ILLRequestsTabs','','','Add customizable tabs to interlibrary loan requests list','Textarea'),
339
('ILLRequestsTabs','','','Add customizable tabs to interlibrary loan requests list','Textarea'),
340
('ILLSendStaffNotices', NULL, NULL, 'Send these ILL notices to staff', 'multiple'),
340
('ILLSendStaffNotices', '', NULL, 'Send these ILL notices to staff', 'multiple'),
341
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
341
('ILS-DI','0','','Enables ILS-DI services at OPAC.','YesNo'),
342
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
342
('ILS-DI:AuthorizedIPs','','Restricts usage of ILS-DI to some IPs','.','Free'),
343
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
343
('ImageLimit','5','','Limit images stored in the database by the Patron Card image manager to this number.','Integer'),
Lines 390-396 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
390
('LinkerModule','Default','Default|FirstMatch|LastMatch','Chooses which linker module to use (see documentation).','Choice'),
390
('LinkerModule','Default','Default|FirstMatch|LastMatch','Chooses which linker module to use (see documentation).','Choice'),
391
('LinkerOptions','','','A pipe-separated list of options for the linker.','free'),
391
('LinkerOptions','','','A pipe-separated list of options for the linker.','free'),
392
('LinkerRelink','1',NULL,'If ON the authority linker will relink headings that have previously been linked every time it runs.','YesNo'),
392
('LinkerRelink','1',NULL,'If ON the authority linker will relink headings that have previously been linked every time it runs.','YesNo'),
393
('ListOwnerDesignated', NULL, NULL, 'Designated list owner at patron deletion', 'Free'),
393
('ListOwnerDesignated', '', NULL, 'Designated list owner at patron deletion', 'Free'),
394
('ListOwnershipUponPatronDeletion', 'delete', 'delete|transfer', 'Defines the action on their public or shared lists when patron is deleted', 'Choice'),
394
('ListOwnershipUponPatronDeletion', 'delete', 'delete|transfer', 'Defines the action on their public or shared lists when patron is deleted', 'Choice'),
395
('LoadCheckoutsTableDelay','0','','Delay before auto-loading checkouts table on checkouts screen','Integer'),
395
('LoadCheckoutsTableDelay','0','','Delay before auto-loading checkouts table on checkouts screen','Integer'),
396
('LoadSearchHistoryToTheFirstLoggedUser', '1', NULL, 'If ON, the next user will automatically get the last searches in their history', 'YesNo'),
396
('LoadSearchHistoryToTheFirstLoggedUser', '1', NULL, 'If ON, the next user will automatically get the last searches in their history', 'YesNo'),
Lines 403-409 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
403
('Mana','2',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','Choice'),
403
('Mana','2',NULL,'request to Mana Webservice. Mana centralize common information between other Koha to facilitate the creation of new subscriptions, vendors, report queries etc... You can search, share, import and comment the content of Mana.','Choice'),
404
('ManaToken','',NULL,'Security token used for authentication on Mana KB service (anti spam)','Textarea'),
404
('ManaToken','',NULL,'Security token used for authentication on Mana KB service (anti spam)','Textarea'),
405
('MARCAuthorityControlField008','|| aca||aabn           | a|a     d',NULL,'Define the contents of MARC21 authority control field 008 position 06-39','Textarea'),
405
('MARCAuthorityControlField008','|| aca||aabn           | a|a     d',NULL,'Define the contents of MARC21 authority control field 008 position 06-39','Textarea'),
406
('MarcFieldDocURL', NULL, NULL, 'URL used for MARC field documentation. Following substitutions are available: {MARC} = marc flavour, eg. "MARC21" or "UNIMARC". {FIELD} = field number, eg. "000" or "048". {LANG} = user language, eg. "en" or "fi-FI"', 'free'),
406
('MarcFieldDocURL', '', NULL, 'URL used for MARC field documentation. Following substitutions are available: {MARC} = marc flavour, eg. "MARC21" or "UNIMARC". {FIELD} = field number, eg. "000" or "048". {LANG} = user language, eg. "en" or "fi-FI"', 'free'),
407
('MarcFieldForCreatorId','',NULL,'Where to store the borrowernumber of the record''s creator','Free'),
407
('MarcFieldForCreatorId','',NULL,'Where to store the borrowernumber of the record''s creator','Free'),
408
('MarcFieldForCreatorName','',NULL,'Where to store the name of the record''s creator','Free'),
408
('MarcFieldForCreatorName','',NULL,'Where to store the name of the record''s creator','Free'),
409
('MarcFieldForModifierId','',NULL,'Where to store the borrowernumber of the record''s last modifier','Free'),
409
('MarcFieldForModifierId','',NULL,'Where to store the borrowernumber of the record''s last modifier','Free'),
Lines 415-421 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
415
('MARCOverlayRules','0',NULL,'Use the MARC record overlay rules system to decide what actions to take for each field when modifying records.','YesNo'),
415
('MARCOverlayRules','0',NULL,'Use the MARC record overlay rules system to decide what actions to take for each field when modifying records.','YesNo'),
416
('MarkLostItemsAsReturned','batchmod,moredetail,cronjob,additem,pendingreserves,onpayment','claim_returned|batchmod|moredetail|cronjob|additem|pendingreserves|onpayment','Mark items as returned when flagged as lost','multiple'),
416
('MarkLostItemsAsReturned','batchmod,moredetail,cronjob,additem,pendingreserves,onpayment','claim_returned|batchmod|moredetail|cronjob|additem|pendingreserves|onpayment','Mark items as returned when flagged as lost','multiple'),
417
('MaxComponentRecords', '300', '','Max number of component records to display','Integer'),
417
('MaxComponentRecords', '300', '','Max number of component records to display','Integer'),
418
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
418
('MaxFine','','','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
419
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
419
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
420
('MaxItemsToDisplayForBatchDel','1000',NULL,'Display up to a given number of items in a single item deletionbatch.','Integer'),
420
('MaxItemsToDisplayForBatchDel','1000',NULL,'Display up to a given number of items in a single item deletionbatch.','Integer'),
421
('MaxItemsToDisplayForBatchMod','1000',NULL,'Display up to a given number of items in a single item modification batch.','Integer'),
421
('MaxItemsToDisplayForBatchMod','1000',NULL,'Display up to a given number of items in a single item modification batch.','Integer'),
Lines 577-583 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
577
('OPACSuggestionAutoFill','0',NULL,'Automatically fill OPAC suggestion form with data from Google Books API','YesNo'),
577
('OPACSuggestionAutoFill','0',NULL,'Automatically fill OPAC suggestion form with data from Google Books API','YesNo'),
578
('OpacSuggestionManagedBy',1,'','Show the name of the staff member who managed a suggestion in OPAC','YesNo'),
578
('OpacSuggestionManagedBy',1,'','Show the name of the staff member who managed a suggestion in OPAC','YesNo'),
579
('OPACSuggestionMandatoryFields','title','','Define the mandatory fields for a patron purchase suggestions made via OPAC.','multiple'),
579
('OPACSuggestionMandatoryFields','title','','Define the mandatory fields for a patron purchase suggestions made via OPAC.','multiple'),
580
('OPACSuggestionUnwantedFields',NULL,'','Define the hidden fields for a patron purchase suggestions made via OPAC.','multiple'),
580
('OPACSuggestionUnwantedFields','','','Define the hidden fields for a patron purchase suggestions made via OPAC.','multiple'),
581
('OpacSuppression','0','','Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details','YesNo'),
581
('OpacSuppression','0','','Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details','YesNo'),
582
('OpacSuppressionByIPRange','','','Restrict the suppression to IP adresses outside of the IP range','free'),
582
('OpacSuppressionByIPRange','','','Restrict the suppression to IP adresses outside of the IP range','free'),
583
('OpacSuppressionRedirect','1','Redirect the opac detail page for suppressed records to an explanatory page (otherwise redirect to 404 error page)','','YesNo'),
583
('OpacSuppressionRedirect','1','Redirect the opac detail page for suppressed records to an explanatory page (otherwise redirect to 404 error page)','','YesNo'),
Lines 682-688 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
682
('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo'),
682
('RentalFeesCheckoutConfirmation', '0', NULL , 'Allow user to confirm when checking out an item with rental fees.', 'YesNo'),
683
('ReplytoDefault','',NULL,'Use this email address as the replyto in emails','Free'),
683
('ReplytoDefault','',NULL,'Use this email address as the replyto in emails','Free'),
684
('ReportsExportFormatODS',1,NULL,'Show ODS download in Reports','YesNo'),
684
('ReportsExportFormatODS',1,NULL,'Show ODS download in Reports','YesNo'),
685
('ReportsExportLimit',NULL,NULL,'Limit for report downloads','Integer'),
685
('ReportsExportLimit','',NULL,'Limit for report downloads','Integer'),
686
('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'),
686
('ReportsLog','0',NULL,'If ON, log information about reports.','YesNo'),
687
('RequireCashRegister','0',NULL,'Require a cash register when collecting a payment','YesNo'),
687
('RequireCashRegister','0',NULL,'Require a cash register when collecting a payment','YesNo'),
688
('RequireChoosingExistingAuthority','0',NULL,'Require existing authority selection in controlled fields during cataloging.','YesNo'),
688
('RequireChoosingExistingAuthority','0',NULL,'Require existing authority selection in controlled fields during cataloging.','YesNo'),
Lines 736-742 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
736
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
736
('SeparateHoldingsBranch','homebranch','homebranch|holdingbranch','Branch used to separate holdings','Choice'),
737
('SerialsDefaultEmailAddress', '', NULL, 'Default email address used as reply-to for notices sent by the serials module.', 'Free'),
737
('SerialsDefaultEmailAddress', '', NULL, 'Default email address used as reply-to for notices sent by the serials module.', 'Free'),
738
('SerialsDefaultReplyTo', '', NULL, 'Default email address that serials notices are sent from.', 'Free'),
738
('SerialsDefaultReplyTo', '', NULL, 'Default email address that serials notices are sent from.', 'Free'),
739
('SerialsSearchResultsLimit', NULL, NULL, 'Serials search results limit', 'integer'),
739
('SerialsSearchResultsLimit', '', NULL, 'Serials search results limit', 'integer'),
740
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
740
('SessionRestrictionByIP','1','Check for change in remote IP address for session security. Disable only when remote IP address changes frequently.','','YesNo'),
741
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
741
('SessionStorage','mysql','mysql|Pg|tmp','Use database or a temporary file for storing session data','Choice'),
742
('ShelfBrowserUsesCcode','1','0','Use the item collection code when finding items for the shelf browser.','YesNo'),
742
('ShelfBrowserUsesCcode','1','0','Use the item collection code when finding items for the shelf browser.','YesNo'),
743
- 

Return to bug 40405