From 7a413f8015c2cc6b5cf8c13788b9a5dab689a81b Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 14 Nov 2022 12:02:19 -0300 Subject: [PATCH] Bug 32191: Tidy upgrade scripts output Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- installer/data/mysql/db_revs/220600001.pl | 8 +++--- installer/data/mysql/db_revs/220600004.pl | 3 +- installer/data/mysql/db_revs/220600005.pl | 4 ++- installer/data/mysql/db_revs/220600006.pl | 6 ++-- installer/data/mysql/db_revs/220600008.pl | 6 ++-- installer/data/mysql/db_revs/220600009.pl | 2 ++ installer/data/mysql/db_revs/220600013.pl | 2 ++ installer/data/mysql/db_revs/220600014.pl | 8 ++++++ installer/data/mysql/db_revs/220600015.pl | 7 +++-- installer/data/mysql/db_revs/220600016.pl | 3 +- installer/data/mysql/db_revs/220600018.pl | 4 ++- installer/data/mysql/db_revs/220600019.pl | 7 ++++- installer/data/mysql/db_revs/220600020.pl | 2 +- installer/data/mysql/db_revs/220600021.pl | 4 ++- installer/data/mysql/db_revs/220600022.pl | 22 ++++++++++++++- installer/data/mysql/db_revs/220600023.pl | 2 ++ installer/data/mysql/db_revs/220600025.pl | 5 ++-- installer/data/mysql/db_revs/220600026.pl | 1 + installer/data/mysql/db_revs/220600027.pl | 5 ++-- installer/data/mysql/db_revs/220600028.pl | 4 ++- installer/data/mysql/db_revs/220600030.pl | 2 ++ installer/data/mysql/db_revs/220600034.pl | 4 ++- installer/data/mysql/db_revs/220600035.pl | 3 +- installer/data/mysql/db_revs/220600036.pl | 3 +- installer/data/mysql/db_revs/220600037.pl | 6 ++-- installer/data/mysql/db_revs/220600038.pl | 3 ++ installer/data/mysql/db_revs/220600039.pl | 6 ++-- installer/data/mysql/db_revs/220600040.pl | 2 ++ installer/data/mysql/db_revs/220600042.pl | 2 +- installer/data/mysql/db_revs/220600043.pl | 3 +- installer/data/mysql/db_revs/220600044.pl | 4 +-- installer/data/mysql/db_revs/220600047.pl | 5 ++-- installer/data/mysql/db_revs/220600051.pl | 1 + installer/data/mysql/db_revs/220600053.pl | 5 ++-- installer/data/mysql/db_revs/220600054.pl | 3 ++ installer/data/mysql/db_revs/220600055.pl | 2 +- installer/data/mysql/db_revs/220600057.pl | 6 ++-- installer/data/mysql/db_revs/220600059.pl | 4 +++ installer/data/mysql/db_revs/220600060.pl | 8 +++--- installer/data/mysql/db_revs/220600061.pl | 3 +- installer/data/mysql/db_revs/220600064.pl | 4 +-- installer/data/mysql/db_revs/220600066.pl | 2 +- installer/data/mysql/db_revs/220600067.pl | 13 +++++---- installer/data/mysql/db_revs/220600068.pl | 4 ++- installer/data/mysql/db_revs/220600070.pl | 2 +- installer/data/mysql/db_revs/220600073.pl | 4 ++- installer/data/mysql/db_revs/220600074.pl | 3 +- installer/data/mysql/db_revs/220600075.pl | 1 - installer/data/mysql/db_revs/220600076.pl | 6 ++-- installer/data/mysql/db_revs/220600077.pl | 3 +- installer/data/mysql/db_revs/220600079.pl | 34 ++++++++++++++++++++++- installer/data/mysql/db_revs/220600081.pl | 6 +++- installer/data/mysql/db_revs/220600083.pl | 4 +++ 53 files changed, 193 insertions(+), 73 deletions(-) diff --git a/installer/data/mysql/db_revs/220600001.pl b/installer/data/mysql/db_revs/220600001.pl index b9c49f9852..6bfb974582 100755 --- a/installer/data/mysql/db_revs/220600001.pl +++ b/installer/data/mysql/db_revs/220600001.pl @@ -2,16 +2,16 @@ use Modern::Perl; return { bug_number => "23659", - description => "Add DefaultHoldPickupLocation syspref", + description => "Allow hold pickup location to default to item home branch for item-level holds", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - # Do you stuffs here + $dbh->do(q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('DefaultHoldPickupLocation','loggedinlibrary','loggedinlibrary|homebranch|holdingbranch','Which branch should a hold pickup location default to. ','choice') }); - # Print useful stuff here - say $out "Added DefaultHoldPickupLocation syspref"; + + say $out "Added new system preference 'DefaultHoldPickupLocation'"; }, }; diff --git a/installer/data/mysql/db_revs/220600004.pl b/installer/data/mysql/db_revs/220600004.pl index dafbe8c148..8eb1811bc3 100755 --- a/installer/data/mysql/db_revs/220600004.pl +++ b/installer/data/mysql/db_revs/220600004.pl @@ -5,7 +5,7 @@ return { description => "Ability to allow guarantor relationship for all patron category types", up => sub { my ($args) = @_; - my ($dbh) = @$args{qw(dbh)}; + my ($dbh,$out) = @$args{qw(dbh out)}; unless ( column_exists( 'categories', 'can_be_guarantee' ) ) { $dbh->do(q{ @@ -13,6 +13,7 @@ return { ADD COLUMN `can_be_guarantee` tinyint(1) NOT NULL default 0 COMMENT 'if patrons of this category can be guarantees' AFTER `checkprevcheckout` }); + say $out "Added column 'categories.can_be_guarantee'"; } $dbh->do(q{ diff --git a/installer/data/mysql/db_revs/220600005.pl b/installer/data/mysql/db_revs/220600005.pl index de4f543139..bcd486c68a 100755 --- a/installer/data/mysql/db_revs/220600005.pl +++ b/installer/data/mysql/db_revs/220600005.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "24239", - description => "Add due_date to illrequests", + description => "Let the ILL module set ad hoc hard due dates", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -13,6 +13,8 @@ return { ADD COLUMN `due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation' AFTER `biblio_id` }); + + say $out "Added column 'illrequests.due_date'"; } }, }; diff --git a/installer/data/mysql/db_revs/220600006.pl b/installer/data/mysql/db_revs/220600006.pl index fdc432fd0f..9dd3f559dc 100755 --- a/installer/data/mysql/db_revs/220600006.pl +++ b/installer/data/mysql/db_revs/220600006.pl @@ -13,7 +13,7 @@ return { COMMENT "patron/borrower's middle name" AFTER firstname }); - say $out "Added middle name column to borrowers table"; + say $out "Added column 'borrowers.middle_name'"; } if( !column_exists( 'deletedborrowers', 'middle_name' ) ) { $dbh->do(q{ @@ -22,7 +22,7 @@ return { COMMENT "patron/borrower's middle name" AFTER firstname }); - say $out "Added middle name column to deletedborrowers table"; + say $out "Added column 'deletedborrowers.middle_name'"; } if( !column_exists( 'borrower_modifications', 'middle_name' ) ) { $dbh->do(q{ @@ -31,7 +31,7 @@ return { COMMENT "patron/borrower's middle name" AFTER firstname }); - say $out "Added middle name column to borrower_modifications table"; + say $out "Added column 'borrower_modifications.middle_name'"; } my ($default_patron_search_fields) = $dbh->selectrow_array( q{ diff --git a/installer/data/mysql/db_revs/220600008.pl b/installer/data/mysql/db_revs/220600008.pl index cbc9416f9b..99ecffc59c 100755 --- a/installer/data/mysql/db_revs/220600008.pl +++ b/installer/data/mysql/db_revs/220600008.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "30327", - description => "Add ComponentSortField and ComponentSortOrder sysprefs", + description => "Sort component parts", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -11,6 +11,8 @@ return { ('ComponentSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), ('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice') }); - say $out "Added ComponentSortField and ComponentSortOrder sysprefs"; + + say $out "Added new system preference 'ComponentSortField'"; + say $out "Added new system preference 'ComponentSortOrder'"; }, }; diff --git a/installer/data/mysql/db_revs/220600009.pl b/installer/data/mysql/db_revs/220600009.pl index 5a5141dc51..8fba0436a5 100755 --- a/installer/data/mysql/db_revs/220600009.pl +++ b/installer/data/mysql/db_revs/220600009.pl @@ -14,6 +14,8 @@ return { COMMENT 'JSON-serialized context information for the job' AFTER `data` }); + + say $out "Added column 'background_jobs.context'"; } }, }; diff --git a/installer/data/mysql/db_revs/220600013.pl b/installer/data/mysql/db_revs/220600013.pl index 082fbbbfe0..090b1590c3 100755 --- a/installer/data/mysql/db_revs/220600013.pl +++ b/installer/data/mysql/db_revs/220600013.pl @@ -11,5 +11,7 @@ return { (module,code,branchcode,name,is_html,title,content,message_transport_type,lang) VALUES ('circulation','OVERDUE_FINE_DESC','','Overdue item fine description',0,'Overdue item fine description','[% item.biblio.title %] [% checkout.date_due | $KohaDates %]','print','default') }); + + say $out "Added new letter 'OVERDUE_FINE_DESC' (print)"; }, }; diff --git a/installer/data/mysql/db_revs/220600014.pl b/installer/data/mysql/db_revs/220600014.pl index ae8593afdd..06ff9fd256 100755 --- a/installer/data/mysql/db_revs/220600014.pl +++ b/installer/data/mysql/db_revs/220600014.pl @@ -12,11 +12,15 @@ return { ('EnableItemGroups','0','','Enable the item groups feature','YesNo'); }); + say $out "Added new system preference 'EnableItemGroups'"; + $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups'); }); + say $out "Added new permission 'manage_item_groups'"; + unless ( TableExists('item_groups') ) { $dbh->do(q{ CREATE TABLE `item_groups` ( @@ -30,6 +34,8 @@ return { CONSTRAINT `item_groups_ibfk_1` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'item_groups'"; } unless ( TableExists('item_group_items') ) { @@ -44,6 +50,8 @@ return { CONSTRAINT `item_group_items_gifk_1` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'item_group_items'"; } }, } diff --git a/installer/data/mysql/db_revs/220600015.pl b/installer/data/mysql/db_revs/220600015.pl index 2749f163d7..89dc2d628b 100755 --- a/installer/data/mysql/db_revs/220600015.pl +++ b/installer/data/mysql/db_revs/220600015.pl @@ -19,7 +19,8 @@ return { ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci }); } - say $out "item_bundles table added"; + + say $out "Added new table 'item_bundles'"; my ($lost_val) = $dbh->selectrow_array( "SELECT MAX(CAST(authorised_value AS SIGNED)) FROM authorised_values WHERE category = 'LOST'", {} ); $lost_val++; @@ -43,7 +44,9 @@ return { ( 'BundleLostValue', $lost_val, '', 'Sets the LOST AV value that represents "Missing from bundle" as a lost value', 'Free' ), ( 'BundleNotLoanValue', $nfl_val, '', 'Sets the NOT_LOAN AV value that represents "Added to bundle" as a not for loan value', 'Free') }); - say $out "System preferences added and set"; + + say $out "Added new system preference 'BundleLostValue'"; + say $out "Added new system preference 'BundleNotLoanValue'"; if( index_exists( 'return_claims', 'issue_id' ) ) { $dbh->do(q{ diff --git a/installer/data/mysql/db_revs/220600016.pl b/installer/data/mysql/db_revs/220600016.pl index c6eb44ae95..bc0cabfc93 100755 --- a/installer/data/mysql/db_revs/220600016.pl +++ b/installer/data/mysql/db_revs/220600016.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "28854", - description => "Add new unique index to return claims", + description => "Add new 'item_issue' unique index to return claims", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -11,7 +11,6 @@ return { ALTER TABLE return_claims ADD UNIQUE KEY item_issue (`itemnumber`,`issue_id`) }); - say $out "item_issue index added to return_claims"; } }, }; diff --git a/installer/data/mysql/db_revs/220600018.pl b/installer/data/mysql/db_revs/220600018.pl index f715b7a2a2..75b9eb54df 100755 --- a/installer/data/mysql/db_revs/220600018.pl +++ b/installer/data/mysql/db_revs/220600018.pl @@ -2,12 +2,14 @@ use Modern::Perl; return { bug_number => 11889, - description => "Add pref ListOwnershipUponPatronDeletion", + description => "Add option to keep public or shared lists when deleting patron", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; $dbh->do(q{ INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES ('ListOwnershipUponPatronDeletion', 'delete', 'delete|transfer', 'When deleting a patron who owns public lists, either delete the public lists or transfer ownership to the patron who deleted the owner', 'Choice'); }); + + say $out "Added new system preference 'ListOwnershipUponPatronDeletion'"; }, }; diff --git a/installer/data/mysql/db_revs/220600019.pl b/installer/data/mysql/db_revs/220600019.pl index 5041522b2d..adcf8ce01a 100755 --- a/installer/data/mysql/db_revs/220600019.pl +++ b/installer/data/mysql/db_revs/220600019.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => 30933, - description => "Add pref ListOwnerDesignated", + description => "Add a designated owner for shared and public lists at patron deletion", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -10,9 +10,14 @@ return { INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('ListOwnerDesignated', NULL, NULL, 'Designated list owner at patron deletion', 'Free') }); + + say $out "Added new system preference 'ListOwnerDesignated'"; + $dbh->do(q{ UPDATE systempreferences SET explanation='Defines the action on their public or shared lists when patron is deleted' WHERE variable = 'ListOwnershipUponPatronDeletion' }); + + say $out "Updated system preference 'ListOwnershipUponPatronDeletion'"; }, }; diff --git a/installer/data/mysql/db_revs/220600020.pl b/installer/data/mysql/db_revs/220600020.pl index e8999a10de..067ed6b720 100755 --- a/installer/data/mysql/db_revs/220600020.pl +++ b/installer/data/mysql/db_revs/220600020.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "31086", - description => "Do not allow null values in branchcodes for reserves", + description => "Do not allow NULL values in branchcodes for reserves", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; diff --git a/installer/data/mysql/db_revs/220600021.pl b/installer/data/mysql/db_revs/220600021.pl index a3be6dda17..f0fbeee4cb 100755 --- a/installer/data/mysql/db_revs/220600021.pl +++ b/installer/data/mysql/db_revs/220600021.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "31157", - description => "Add OverdueNoticeFrom preference", + description => "Make --frombranch option (overdue_notices.pl) available as a syspref", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -11,5 +11,7 @@ return { INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('OverdueNoticeFrom', 'cron', 'cron|item-issuebranch|item-homebranch', 'Organize and send overdue notices by item home library or checkout library', 'Choice') }); + + say $out "Added new system preference 'OverdueNoticeFrom'"; }, }; diff --git a/installer/data/mysql/db_revs/220600022.pl b/installer/data/mysql/db_revs/220600022.pl index e3b427e97f..77f622f72a 100755 --- a/installer/data/mysql/db_revs/220600022.pl +++ b/installer/data/mysql/db_revs/220600022.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "30650", - description => "Curbside pickup tables", + description => "Add Curbside pickup feature", up => sub { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; @@ -50,6 +50,8 @@ return { ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; } ); + + say $out "Added new table 'curbside_pickup_policy'"; } unless ( TableExists('curbside_pickup_opening_slots') ) { @@ -66,6 +68,9 @@ return { FOREIGN KEY (curbside_pickup_policy_id) REFERENCES curbside_pickup_policy(id) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'curbside_pickup_opening_slots'"; + my $existing_slots = $dbh->selectall_arrayref(q{SELECT * FROM curbside_pickup_policy}, { Slice => {} }); my $insert_sth = $dbh->prepare(q{INSERT INTO curbside_pickup_opening_slots ( curbside_pickup_policy_id, day, start_hour, start_minute, end_hour, end_minute ) VALUES (?, ?, ?, ?, ?, ?)}); for my $slot ( @$existing_slots ) { @@ -141,6 +146,8 @@ return { ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; } ); + + say $out "Added new table 'curbside_pickups'"; } unless ( TableExists('curbside_pickup_issues') ) { $dbh->do( @@ -155,6 +162,8 @@ return { ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; } ); + + say $out "Added new table 'curbside_pickup_issues'"; } $dbh->do( q{ @@ -162,28 +171,39 @@ return { } ); + say $out "Added new letter 'NEW_CURBSIDE_PICKUP' (email)"; + $dbh->do(q{ INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` ) VALUES ('CurbsidePickup', '0', NULL, 'Enable curbside pickup', 'YesNo') }); + say $out "Added new system preference 'CurbsidePickup'"; + $dbh->do(qq{ INSERT IGNORE permissions (module_bit, code, description) VALUES (1, 'manage_curbside_pickups', 'Manage curbside pickups (circulation)') }); + + say $out "Added new permission 'manage_curbside_pickups' (circulation)"; + $dbh->do(qq{ INSERT IGNORE permissions (module_bit, code, description) VALUES (3, 'manage_curbside_pickups', 'Manage curbside pickups (admin)') }); + say $out "Added new permission 'manage_curbside_pickups' (admin)"; + unless ( column_exists('curbside_pickup_policy', 'enable_waiting_holds_only') ) { $dbh->do(q{ ALTER table curbside_pickup_policy ADD COLUMN enable_waiting_holds_only TINYINT(1) NOT NULL DEFAULT 0 AFTER enabled }); + + say $out "Added column 'curbside_pickup_policy.enable_waiting_holds_only'"; } } } diff --git a/installer/data/mysql/db_revs/220600023.pl b/installer/data/mysql/db_revs/220600023.pl index d7cef277b2..d3c9b488c5 100755 --- a/installer/data/mysql/db_revs/220600023.pl +++ b/installer/data/mysql/db_revs/220600023.pl @@ -16,6 +16,8 @@ return { PRIMARY KEY (`hold_cancellation_request_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'hold_cancellation_requests'"; } my ($count) = $dbh->selectrow_array(q{ diff --git a/installer/data/mysql/db_revs/220600025.pl b/installer/data/mysql/db_revs/220600025.pl index 6aa293bac2..92bbf7f7c4 100755 --- a/installer/data/mysql/db_revs/220600025.pl +++ b/installer/data/mysql/db_revs/220600025.pl @@ -11,7 +11,7 @@ return { ('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'), ('ExpireReservesAutoFillEmail','', NULL,'. Send email notification of hold filled from automatically expired/cancelled hold to this address. If not defined, Koha will fallback to the library reply-to address','Free'); }); - say $out "Added ExpireReservesAutoFill system preferences"; + say $out "Added new system preference 'ExpireReservesAutoFill'"; $dbh->do(q{ INSERT IGNORE INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type) @@ -24,6 +24,7 @@ Author: <> Item: <> Pickup location: <>', 'email'); }); - say $out "Added HOLD_CHANGED notice"; + + say $out "Added new letter 'HOLD_CHANGED' (email)"; }, }; diff --git a/installer/data/mysql/db_revs/220600026.pl b/installer/data/mysql/db_revs/220600026.pl index 2c5df5d07c..46cf14a4c1 100755 --- a/installer/data/mysql/db_revs/220600026.pl +++ b/installer/data/mysql/db_revs/220600026.pl @@ -12,6 +12,7 @@ return { ADD COLUMN script varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the name of the cron script that caused this change' AFTER interface }); + say $out "Added column 'action_logs.script'"; } }, }; diff --git a/installer/data/mysql/db_revs/220600027.pl b/installer/data/mysql/db_revs/220600027.pl index 750bfab5f5..c41645cfef 100755 --- a/installer/data/mysql/db_revs/220600027.pl +++ b/installer/data/mysql/db_revs/220600027.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "28269", - description => "Add new system preference SearchWithISSNVariations", + description => "Make it possible to search orders with ISSN", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -10,7 +10,8 @@ return { $dbh->do( q{ INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo') - }); + + say $out "Added new system preference 'SearchWithISSNVariations'"; }, }; diff --git a/installer/data/mysql/db_revs/220600028.pl b/installer/data/mysql/db_revs/220600028.pl index 4e717c81bf..052f219245 100755 --- a/installer/data/mysql/db_revs/220600028.pl +++ b/installer/data/mysql/db_revs/220600028.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "30077", - description => "Add new system preference IntranetAddMastheadLibraryPulldown", + description => "Add option for library dropdown in search function for staff interface", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -10,5 +10,7 @@ return { INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES ('IntranetAddMastheadLibraryPulldown','0','','Add a library select pulldown menu on the staff header search','YesNo ') }); + + say $out "Added new system preference 'IntranetAddMastheadLibraryPulldown'"; }, }; diff --git a/installer/data/mysql/db_revs/220600030.pl b/installer/data/mysql/db_revs/220600030.pl index 0f2865dc60..8214008285 100755 --- a/installer/data/mysql/db_revs/220600030.pl +++ b/installer/data/mysql/db_revs/220600030.pl @@ -16,5 +16,7 @@ return { END WHERE variable='OPACSuggestionAutoFill'; }); + + say $out "Updated system preference 'OPACSuggestionAutoFill'"; }, }; diff --git a/installer/data/mysql/db_revs/220600034.pl b/installer/data/mysql/db_revs/220600034.pl index 719d8e9c9b..8e5be9f900 100755 --- a/installer/data/mysql/db_revs/220600034.pl +++ b/installer/data/mysql/db_revs/220600034.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "29897", - description => "Add new system preference OPACAuthorIdentifiers", + description => "Display author identifiers for researchers", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -10,5 +10,7 @@ return { INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('OPACAuthorIdentifiers','0','','Display author identifiers on the OPAC detail page','YesNo') }); + + say $out "Added new system preference 'OPACAuthorIdentifiers'"; }, }; diff --git a/installer/data/mysql/db_revs/220600035.pl b/installer/data/mysql/db_revs/220600035.pl index bce0671836..d8f7879c34 100755 --- a/installer/data/mysql/db_revs/220600035.pl +++ b/installer/data/mysql/db_revs/220600035.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "28787", - description => "Add new letter 2FA_OTP_TOKEN", + description => "Send a notice with the TOTP token", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -11,5 +11,6 @@ return { ('members', '2FA_OTP_TOKEN', '', 'two-authentication step token', 0, 'Two-authentication step token', 'Dear [% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])\r\n\r\nYour authentication token is [% otp_token %]. \r\nIt is valid one minute.', 'email') }); + say $out "Added new letter '2FA_OTP_TOKEN' (email)"; }, }; diff --git a/installer/data/mysql/db_revs/220600036.pl b/installer/data/mysql/db_revs/220600036.pl index 4347bd682a..c81d449929 100755 --- a/installer/data/mysql/db_revs/220600036.pl +++ b/installer/data/mysql/db_revs/220600036.pl @@ -10,7 +10,8 @@ return { $dbh->do(q{ ALTER TABLE aqbooksellers ADD COLUMN type varchar(255) DEFAULT NULL AFTER accountnumber }); - say $out "Added type column to aqbooksellers"; + + say $out "Added column 'aqbooksellers.type'"; } $dbh->do(q{ INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('VENDOR_TYPE', 1); diff --git a/installer/data/mysql/db_revs/220600037.pl b/installer/data/mysql/db_revs/220600037.pl index c3e30cc05f..55fe5e0c18 100755 --- a/installer/data/mysql/db_revs/220600037.pl +++ b/installer/data/mysql/db_revs/220600037.pl @@ -18,7 +18,7 @@ return { ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); - say $out "Added restriction_types table"; + say $out "Added new table 'restriction_types'"; } $dbh->do(q{ @@ -44,9 +44,9 @@ return { } $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_patron_restrictions', 'Manage patron restrictions')}); - say $out "Added manage_patron_restrictions permission"; + say $out "Added new permission 'manage_patron_restrictions'"; $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('PatronRestrictionTypes', '0', 'If enabled, it is possible to specify the "type" of patron restriction being applied.', '', 'YesNo');}); - say $out "Added PatronRestrictionTypes preference"; + say $out "Added new system preference 'PatronRestrictionTypes'"; }, }; diff --git a/installer/data/mysql/db_revs/220600038.pl b/installer/data/mysql/db_revs/220600038.pl index 127439d5dd..fc196cf157 100755 --- a/installer/data/mysql/db_revs/220600038.pl +++ b/installer/data/mysql/db_revs/220600038.pl @@ -12,6 +12,9 @@ return { (10, 'manual_invoice', 'Add manual invoices to a patron account') }); + say $out "Added new permission 'manual_credit'"; + say $out "Added new permission 'manual_invoice'"; + $dbh->do(q{ INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code) SELECT borrowernumber, 10, 'manual_credit' FROM user_permissions WHERE code = 'remaining_permissions' diff --git a/installer/data/mysql/db_revs/220600039.pl b/installer/data/mysql/db_revs/220600039.pl index 58b1c73df8..53cde75ebd 100755 --- a/installer/data/mysql/db_revs/220600039.pl +++ b/installer/data/mysql/db_revs/220600039.pl @@ -6,7 +6,7 @@ return { up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - if( !column_exists( 'suggestions', 'staff_note' ) ) { + if ( !column_exists( 'suggestions', 'staff_note' ) ) { $dbh->do(q{ ALTER TABLE suggestions ADD COLUMN staff_note longtext NULL DEFAULT NULL @@ -14,7 +14,7 @@ return { AFTER note }); } - # Print useful stuff here - say $out "Add staff_note column to suggestions table"; + + say $out "Added column 'suggestions.staff_note'"; }, }; diff --git a/installer/data/mysql/db_revs/220600040.pl b/installer/data/mysql/db_revs/220600040.pl index 6396fdd7e9..1d9aeb0c49 100755 --- a/installer/data/mysql/db_revs/220600040.pl +++ b/installer/data/mysql/db_revs/220600040.pl @@ -10,5 +10,7 @@ return { $dbh->do(q{ INSERT IGNORE INTO letter (module, code, name, is_html, title, content, message_transport_type) VALUES ('pos', 'RECEIPT', 'Point of sale receipt', 1, "Receipt", "[% USE KohaDates %]\r\n[% USE Branches %]\r\n[% USE Price %]\r\n[% PROCESS \'accounts.inc\' %]\r\n\r\n[% IF ( LibraryName ) %]\r\n \r\n \r\n \r\n[% END %]\r\n \r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n [% FOREACH debit IN credit.debits %]\r\n \r\n \r\n \r\n \r\n [% END %]\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n
\r\n

[% LibraryName | html %]

\r\n
\r\n

[% Branches.GetName( credit.branchcode ) | html %]

\r\n
\r\n

[% credit.date | $KohaDates %]

\r\n
Transaction ID: [% credit.accountlines_id %]
Operator ID: [% credit.manager_id %]
Payment type: [% credit.payment_type %]
\r\n

Fee receipt

\r\n
Description of chargesAmount
[% PROCESS account_type_description account=debit %][% debit.amount * -1 | $Price %]
Total: [% credit.amount * -1| $Price %]
Tendered: [% collected | $Price %]
Change: [% change | $Price %]
\r\n", 'email'); }); + + say $out "Added new letter 'RECEIPT' (email)"; }, }; diff --git a/installer/data/mysql/db_revs/220600042.pl b/installer/data/mysql/db_revs/220600042.pl index b1bd0d781f..60e7a7b931 100755 --- a/installer/data/mysql/db_revs/220600042.pl +++ b/installer/data/mysql/db_revs/220600042.pl @@ -12,6 +12,6 @@ return { 'Used to autogenerate a Control Number: biblionumber will be as biblionumber; OFF will leave it as is','Choice'); }); - say $out "Added system preference autoControlNumber"; + say $out "Added new system preference 'autoControlNumber'"; }, }; diff --git a/installer/data/mysql/db_revs/220600043.pl b/installer/data/mysql/db_revs/220600043.pl index be8dd450ab..3ff8ae89c4 100755 --- a/installer/data/mysql/db_revs/220600043.pl +++ b/installer/data/mysql/db_revs/220600043.pl @@ -8,6 +8,7 @@ return { my ($dbh, $out) = @$args{qw(dbh out)}; $dbh->do(q{INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo')}); - say $out "Syspref UseLocationAsAQInSIP has been added"; + + say $out "Added new system preference 'UseLocationAsAQInSIP'"; }, } diff --git a/installer/data/mysql/db_revs/220600044.pl b/installer/data/mysql/db_revs/220600044.pl index 45790ef52d..6e60342dcf 100755 --- a/installer/data/mysql/db_revs/220600044.pl +++ b/installer/data/mysql/db_revs/220600044.pl @@ -8,9 +8,9 @@ return { my ($dbh, $out) = @$args{qw(dbh out)}; $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('RetainCatalogSearchTerms', '1', NULL, 'If enabled, searches entered into the catalog search bar will be retained', 'YesNo') }); - say $out "Added `RetainCatalogSearchTerms` preference"; + say $out "Added new system preference 'RetainCatalogSearchTerms'"; $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('RetainPatronSearchTerms', '1', NULL, 'If enabled, searches entered into the checkout and patrons search bars will be retained', 'YesNo') }); - say $out "Added `RetainPatronsSearchTerms` preference"; + say $out "Added new system preference 'RetainPatronSearchTerms'"; }, }; diff --git a/installer/data/mysql/db_revs/220600047.pl b/installer/data/mysql/db_revs/220600047.pl index 56337b6429..09d23b85f9 100755 --- a/installer/data/mysql/db_revs/220600047.pl +++ b/installer/data/mysql/db_revs/220600047.pl @@ -14,8 +14,9 @@ return { ('RequireChoosingExistingAuthority',?,NULL,'Require selecting existing authority entry in controlled fields during cataloging.','YesNo'), ('AutoLinkBiblios',?,NULL,'If enabled, link biblio to authorities on creation and edit','YesNo') },undef,($biblio_adds_authorities eq '1' ? '0' : '1', $biblio_adds_authorities)); - say $out "Added RequireChoosingExistingAuthority and AutoLinkBiblios"; + say $out "Added new system preference 'RequireChoosingExistingAuthority'"; + say $out "Added new system preference 'AutoLinkBiblios'"; $dbh->do(q{DELETE FROM systempreferences WHERE variable="BiblioAddsAuthorities";}); - say $out "BiblioAddsAuthorities removed"; + say $out "Removed system preference 'BiblioAddsAuthorities'"; }, }; diff --git a/installer/data/mysql/db_revs/220600051.pl b/installer/data/mysql/db_revs/220600051.pl index 5e030823a8..d1c803af9d 100755 --- a/installer/data/mysql/db_revs/220600051.pl +++ b/installer/data/mysql/db_revs/220600051.pl @@ -12,6 +12,7 @@ return { ALTER TABLE statistics ADD COLUMN categorycode varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from the borrowers table, links transaction to a specific borrower category' }); + say $out "Added column 'statistics.categorycode'"; } }, }; diff --git a/installer/data/mysql/db_revs/220600053.pl b/installer/data/mysql/db_revs/220600053.pl index 42e8ebfaea..84ea1ddac9 100755 --- a/installer/data/mysql/db_revs/220600053.pl +++ b/installer/data/mysql/db_revs/220600053.pl @@ -7,16 +7,15 @@ return { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; $dbh->do(q{INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UPDATE', '', 'ILL request update', 0, "Interlibrary loan request update", "Dear [% borrower.firstname %] [% borrower.surname %],\n\nThe Interlibrary loans request number [% illrequest.illrequest_id %] you placed for\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nhas been updated\n\nDetails of the update are below:\n\n[% additional_text %]\n\nKind regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'email', 'default');}); + say $out "Added new letter 'ILL_REQUEST_UPDATE' (email)"; $dbh->do(q{INSERT IGNORE INTO letter(module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ('ill', 'ILL_REQUEST_UPDATE', '', 'ILL request update', 0, "Interlibrary loan request update", "Dear [% borrower.firstname %] [% borrower.surname %],\n\nThe Interlibrary loans request number [% illrequest.illrequest_id %] you placed for\n\n- [% ill_bib_title %] - [% ill_bib_author %]\n\nhas been updated\n\nDetails of the update are below:\n\n[% additional_text %]\n\nKind regards\n\n[% branch.branchname %]\n[% branch.branchaddress1 %]\n[% branch.branchaddress2 %]\n[% branch.branchaddress3 %]\n[% branch.branchcity %]\n[% branch.branchstate %]\n[% branch.branchzip %]\n[% branch.branchphone %]\n[% branch.branchillemail %]\n[% branch.branchemail %]", 'sms', 'default');}); + say $out "Added new letter 'ILL_REQUEST_UPDATE' (sms)"; $dbh->do(q{INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_update', 0);}); my $ready_id = $dbh->last_insert_id(undef, undef, 'message_attributes', undef); if (defined $ready_id) { $dbh->do(qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'email', 0, 'ill', 'ILL_REQUEST_UPDATE');)); $dbh->do(qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'sms', 0, 'ill', 'ILL_REQUEST_UPDATE');)); $dbh->do(qq(INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code) VALUES ($ready_id, 'phone', 0, 'ill', 'ILL_REQUEST_UPDATE');)); - say $out "Bug 30484 DB update complete"; - } else { - say $out "Bug 30484 DB update not completed"; } }, }; diff --git a/installer/data/mysql/db_revs/220600054.pl b/installer/data/mysql/db_revs/220600054.pl index daa80ba933..6e7cf9add9 100755 --- a/installer/data/mysql/db_revs/220600054.pl +++ b/installer/data/mysql/db_revs/220600054.pl @@ -8,6 +8,7 @@ return { my ($dbh, $out) = @$args{qw(dbh out)}; $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('EmailPatronRegistrations', '0', '0|EmailAddressForPatronRegistrations|BranchEmailAddress|KohaAdminEmailAddress', 'Choose email address that new patron registrations will be sent to: ', 'Choice'), ('EmailAddressForPatronRegistrations', '', '', ' If you choose EmailAddressForPatronRegistrations you have to enter a valid email address: ', 'free') }); + say $out "Added new system preference 'EmailPatronRegistrations'"; $dbh->do(q{INSERT IGNORE INTO letter (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ( 'members', 'OPAC_REG', '', 'New OPAC self-registration submitted', 1, 'New OPAC self-registration', '

New OPAC self-registration

@@ -25,5 +26,7 @@ return { [% IF borrower.categorycode %]
  • Patron category: [% borrower.categorycode %]
  • [% END %]

    ', 'email', 'default') }); + + say $out "Added new letter 'OPAC_REG' (email)"; }, }; diff --git a/installer/data/mysql/db_revs/220600055.pl b/installer/data/mysql/db_revs/220600055.pl index 8e53efecf2..2051ca5376 100755 --- a/installer/data/mysql/db_revs/220600055.pl +++ b/installer/data/mysql/db_revs/220600055.pl @@ -10,6 +10,6 @@ return { INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo') }); - say $out "Added UseOCLCEncodingLevels system preference"; + say $out "Added new system preference 'UseOCLCEncodingLevels'"; }, }; diff --git a/installer/data/mysql/db_revs/220600057.pl b/installer/data/mysql/db_revs/220600057.pl index c0a6d361c1..40afb46f13 100755 --- a/installer/data/mysql/db_revs/220600057.pl +++ b/installer/data/mysql/db_revs/220600057.pl @@ -6,12 +6,12 @@ return { up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - # Do you stuffs here + $dbh->do(q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('HoldsSplitQueueNumbering', 'actual', 'actual|virtual', 'If the holds queue is split, decide if the actual priorities should be displayed', 'Choice') }); - # Print useful stuff here - say $out "Added HoldsSplitQueueNumbering if not already there"; + + say $out "Added new system preference 'HoldsSplitQueueNumbering'"; }, }; diff --git a/installer/data/mysql/db_revs/220600059.pl b/installer/data/mysql/db_revs/220600059.pl index 56970ed02a..9851bbaa40 100755 --- a/installer/data/mysql/db_revs/220600059.pl +++ b/installer/data/mysql/db_revs/220600059.pl @@ -13,10 +13,14 @@ return { "Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nWe want to notify you that your password has been changed. If you did not change it yourself (or requested that change), please contact library staff.\r\n\r\nYour library.", 'email'); }); + say $out "Added new letter 'PASSWORD_CHANGE' (email)"; + # Add systempreference $dbh->do(q{ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('NotifyPasswordChange','0','','Notify patrons whenever their password is changed.','YesNo') }); + + say $out "Added new system preference 'NotifyPasswordChange'"; }, }; diff --git a/installer/data/mysql/db_revs/220600060.pl b/installer/data/mysql/db_revs/220600060.pl index cb8fdf72b3..a786fb6c15 100755 --- a/installer/data/mysql/db_revs/220600060.pl +++ b/installer/data/mysql/db_revs/220600060.pl @@ -1,7 +1,7 @@ use Modern::Perl; return { bug_number => "10950", - description => "Add pronouns to borrowers table", + description => "Add preferred pronoun field to patron record", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -12,7 +12,7 @@ return { COMMENT "patron/borrower's pronouns" AFTER initials }); - say $out "Added pronouns column to borrowers table"; + say $out "Added column 'borrowers.pronouns'"; } if( !column_exists( 'deletedborrowers', 'pronouns' ) ) { $dbh->do(q{ @@ -21,7 +21,7 @@ return { COMMENT "patron/borrower's pronouns" AFTER initials }); - say $out "Added pronouns column to deletedborrowers table"; + say $out "Added column 'deletedborrowers.pronouns'"; } if( !column_exists( 'borrower_modifications', 'pronouns' ) ) { $dbh->do(q{ @@ -30,7 +30,7 @@ return { COMMENT "patron/borrower's pronouns" AFTER initials }); - say $out "Added pronouns column to borrower_modifications table"; + say $out "Added column 'borrower_modifications.pronouns'"; } }, } diff --git a/installer/data/mysql/db_revs/220600061.pl b/installer/data/mysql/db_revs/220600061.pl index ba4a1e18cd..902083b8ef 100755 --- a/installer/data/mysql/db_revs/220600061.pl +++ b/installer/data/mysql/db_revs/220600061.pl @@ -2,11 +2,12 @@ use Modern::Perl; return { bug_number => "31333", - description => "Add new suggestionPatronCategoryExceptions system preference", + description => "Add the ability to limit purchase suggestions by patron category", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('suggestionPatronCategoryExceptions', '', '', 'List the patron categories not affected by suggestion system preference if on', 'Free') }); + say $out "Added new system preference 'suggestionPatronCategoryExceptions'"; }, }; diff --git a/installer/data/mysql/db_revs/220600064.pl b/installer/data/mysql/db_revs/220600064.pl index afd6b73d88..7aaa4e5658 100755 --- a/installer/data/mysql/db_revs/220600064.pl +++ b/installer/data/mysql/db_revs/220600064.pl @@ -12,14 +12,14 @@ return { VALUES ('OPACAllowUserToChangeBranch','','Pending, In-Transit, Suspended','Allow users to change the library to pick up a hold for these statuses:','multiple'); }); + say $out "Added new system preference 'OPACAllowUserToChangeBranch'"; + $dbh->do(q{ UPDATE systempreferences SET value=(SELECT CASE WHEN value=1 THEN 'intransit' ELSE '' END FROM systempreferences WHERE variable='OPACInTransitHoldPickupLocationChange') WHERE variable='OPACAllowUserToChangeBranch' }); - say $out "Added new system preference 'OPACAllowUserToChangeBranch'"; - $dbh->do(q{ DELETE FROM systempreferences WHERE variable = 'OPACInTransitHoldPickupLocationChange' diff --git a/installer/data/mysql/db_revs/220600066.pl b/installer/data/mysql/db_revs/220600066.pl index e577e65829..8f0016335d 100755 --- a/installer/data/mysql/db_revs/220600066.pl +++ b/installer/data/mysql/db_revs/220600066.pl @@ -13,7 +13,7 @@ return { ADD CONSTRAINT letter_fk FOREIGN KEY (letter_id) REFERENCES letter(id) ON DELETE SET NULL ON UPDATE CASCADE }); - say $out "Added 'letter_id' column to 'message_queue' table"; + say $out "Added column 'message_queue.letter_id'"; } }, }; diff --git a/installer/data/mysql/db_revs/220600067.pl b/installer/data/mysql/db_revs/220600067.pl index 70b9d1f827..aacc8ab977 100755 --- a/installer/data/mysql/db_revs/220600067.pl +++ b/installer/data/mysql/db_revs/220600067.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "17170", - description => "Add permission for creating saved search filters", + description => "Add saved search filters feature", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -10,7 +10,9 @@ return { INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (3, 'manage_search_filters', 'Manage custom search filters'); }); - say $out "Added manage_search_filters permission"; + + say $out "Added new permission 'manage_search_filters'"; + unless( TableExists( 'search_filters' ) ){ $dbh->do(q{ CREATE TABLE `search_filters` ( @@ -23,14 +25,13 @@ return { PRIMARY KEY (`search_filter_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); - say $out "Added search_filters table"; - } else { - say $out "search_filters table already created"; + say $out "Added new table 'search_filters'"; } $dbh->do(q{ INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo') }); - say $out "Added SavedSearchFilters system preference"; + + say $out "Added new system preference 'SavedSearchFilters'"; }, } diff --git a/installer/data/mysql/db_revs/220600068.pl b/installer/data/mysql/db_revs/220600068.pl index 58f46a77ed..c4fae58407 100755 --- a/installer/data/mysql/db_revs/220600068.pl +++ b/installer/data/mysql/db_revs/220600068.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "30588", - description => "Add an 'enforce' option for TwoFactorAuthentication", + description => "Add an 'enforce' option for 'TwoFactorAuthentication' system preference", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -13,5 +13,7 @@ return { type="Choice" WHERE variable="TwoFactorAuthentication" }); + + say $out "Updated system preference 'TwoFactorAuthentication'"; }, }; diff --git a/installer/data/mysql/db_revs/220600070.pl b/installer/data/mysql/db_revs/220600070.pl index a1a00dfd17..aff2f69537 100755 --- a/installer/data/mysql/db_revs/220600070.pl +++ b/installer/data/mysql/db_revs/220600070.pl @@ -13,6 +13,6 @@ return { WHERE variable = "OpacHiddenItemsExceptions" }); # Print useful stuff here - say $out "Settings for OpacHiddenItemsExceptions have been updated"; + say $out "Updated system preference 'OpacHiddenItemsExceptions'"; }, }; diff --git a/installer/data/mysql/db_revs/220600073.pl b/installer/data/mysql/db_revs/220600073.pl index de0c91d710..72cc10238c 100755 --- a/installer/data/mysql/db_revs/220600073.pl +++ b/installer/data/mysql/db_revs/220600073.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => '30036', - description => 'Add syspref AuthorityXSLTOpacResultsDisplay', + description => 'Add XSLT for authority results view in OPAC', up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -11,5 +11,7 @@ return { INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('AuthorityXSLTOpacResultsDisplay','','','Enable XSL stylesheet control over authority results page in the OPAC','Free') }); + + say $out "Added new system preference 'AuthorityXSLTOpacResultsDisplay'"; }, }; diff --git a/installer/data/mysql/db_revs/220600074.pl b/installer/data/mysql/db_revs/220600074.pl index f3060dd445..d4ee868541 100755 --- a/installer/data/mysql/db_revs/220600074.pl +++ b/installer/data/mysql/db_revs/220600074.pl @@ -6,8 +6,7 @@ return { up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - # Do you stuffs here + $dbh->do(q{UPDATE IGNORE systempreferences SET explanation = "This is a list of value pairs. When an item is checked in, if the not for loan value on the left matches the items not for loan value it will be updated to the right-hand value. E.g. '-1: 0' will cause an item that was set to 'Ordered' to now be available for loan. Can be used for showing only the not for loan description. E.g. '-1: ONLYMESSAGE'. Each pair of values should be on a separate line." WHERE variable = "UpdateNotForLoanStatusOnCheckin"}); - say $out "Update is going well so far"; }, }; diff --git a/installer/data/mysql/db_revs/220600075.pl b/installer/data/mysql/db_revs/220600075.pl index c5fbd8d546..df2dbb255c 100755 --- a/installer/data/mysql/db_revs/220600075.pl +++ b/installer/data/mysql/db_revs/220600075.pl @@ -8,6 +8,5 @@ return { my ($dbh, $out) = @$args{qw(dbh out)}; $dbh->do(q{ALTER TABLE `tmp_holdsqueue` ADD `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER item_level_request}); - say $out ""; }, }; diff --git a/installer/data/mysql/db_revs/220600076.pl b/installer/data/mysql/db_revs/220600076.pl index 5bda1b1b4f..1505995fcc 100755 --- a/installer/data/mysql/db_revs/220600076.pl +++ b/installer/data/mysql/db_revs/220600076.pl @@ -2,7 +2,7 @@ use Modern::Perl; return { bug_number => "29792", - description => "Add AutomaticConfirmTransfer system preference", + description => "Fix transfers created from 'wrong transfer' checkin are not sent if modal dismissed", up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; @@ -10,7 +10,7 @@ return { INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo') }); - # Print useful stuff here - say $out "AutomaticConfirmTransfer system preference added"; + + say $out "Added new system preference 'AutomaticConfirmTransfer'"; }, }; diff --git a/installer/data/mysql/db_revs/220600077.pl b/installer/data/mysql/db_revs/220600077.pl index c0deacdff7..15df20d8a3 100755 --- a/installer/data/mysql/db_revs/220600077.pl +++ b/installer/data/mysql/db_revs/220600077.pl @@ -112,6 +112,7 @@ END_CONTENT INSERT IGNORE INTO letter ( module, code, branchcode, name, is_html, title, content, message_transport_type, lang) VALUES ( 'members', 'ACCOUNTS_SUMMARY', '', 'Account balance slip', 1, 'Account summary for [% borrower.firstname %] [% borrower.surname %]', "$slip_content", 'print', 'default' ) }); - say $out "Notice added"; + + say $out "Added new letter 'ACCOUNTS_SUMMARY' (print)"; }, }; diff --git a/installer/data/mysql/db_revs/220600079.pl b/installer/data/mysql/db_revs/220600079.pl index 91fad4c2bf..0c484622cf 100755 --- a/installer/data/mysql/db_revs/220600079.pl +++ b/installer/data/mysql/db_revs/220600079.pl @@ -12,11 +12,15 @@ return { VALUES ('ERMModule', '0', NULL, 'Enable the E-Resource management module', 'YesNo'); }); + say $out "Added new system preference 'ERMModule'"; + $dbh->do(q{ INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) VALUES (28, 'erm', 'Manage electronic resources', 0) }); + say $out "Added new permission 'erm'"; + unless ( TableExists('erm_agreements') ) { $dbh->do(q{ CREATE TABLE `erm_agreements` ( @@ -33,6 +37,8 @@ return { PRIMARY KEY(`agreement_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_agreements'"; } $dbh->do(q{ @@ -68,6 +74,8 @@ return { PRIMARY KEY(`agreement_period_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_agreement_periods'"; } unless ( TableExists('erm_licenses') ) { $dbh->do(q{ @@ -84,6 +92,8 @@ return { PRIMARY KEY(`license_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_licenses'"; } unless ( TableExists('erm_agreement_licenses') ) { $dbh->do(q{ @@ -101,6 +111,8 @@ return { UNIQUE KEY `erm_agreement_licenses_uniq` (`agreement_id`, `license_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_agreement_licenses'"; } $dbh->do(q{ INSERT IGNORE INTO authorised_value_categories (category_name, is_system) @@ -142,6 +154,8 @@ return { CONSTRAINT `erm_user_roles_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_user_roles'"; } $dbh->do(q{ INSERT IGNORE INTO authorised_value_categories (category_name, is_system) @@ -167,6 +181,8 @@ return { PRIMARY KEY(`agreement_id`, `related_agreement_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_agreement_relationships'"; } unless ( TableExists('erm_documents') ) { @@ -188,6 +204,8 @@ return { PRIMARY KEY(`document_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_documents'"; } unless ( TableExists('erm_eholdings_packages') ) { @@ -206,6 +224,8 @@ return { PRIMARY KEY(`package_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_eholdings_packages'"; } unless ( TableExists('erm_eholdings_packages_agreements') ) { @@ -218,6 +238,8 @@ return { CONSTRAINT `erm_eholdings_packages_agreements_ibfk_2` FOREIGN KEY (`agreement_id`) REFERENCES `erm_agreements` (`agreement_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_eholdings_packages_agreements'"; } unless ( TableExists('erm_eholdings_titles') ) { @@ -254,6 +276,8 @@ return { PRIMARY KEY(`title_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_eholdings_titles'"; } unless ( TableExists('erm_eholdings_resources') ) { $dbh->do(q{ @@ -272,6 +296,8 @@ return { PRIMARY KEY(`resource_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'erm_eholdings_resources'"; } unless ( column_exists('aqbooksellers', 'external_id') ) { @@ -280,6 +306,8 @@ return { ADD COLUMN `external_id` VARCHAR(255) DEFAULT NULL AFTER `deliverytime` }); + + say $out "Added column 'aqbooksellers.external_id'"; } $dbh->do(q{ @@ -325,6 +353,9 @@ return { INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('ERMProviders', 'local', 'local|ebsco', 'Set the providers for the ERM module', 'multiple'); }); + + say $out "Added new system preference 'ERMProviders'"; + $dbh->do(q{ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES @@ -332,6 +363,7 @@ return { ('ERMProviderEbscoApiKey', '', '', 'API key for EBSCO', 'free'); }); - + say $out "Added new system preference 'ERMProviderEbscoCustomerID'"; + say $out "Added new system preference 'ERMProviderEbscoApiKey'"; } }; diff --git a/installer/data/mysql/db_revs/220600081.pl b/installer/data/mysql/db_revs/220600081.pl index 6231a585f4..33588a5d29 100755 --- a/installer/data/mysql/db_revs/220600081.pl +++ b/installer/data/mysql/db_revs/220600081.pl @@ -15,7 +15,7 @@ return { ( 3, 'manage_identity_providers', 'Manage authentication providers') }); - say $out "manage_identity_providers permission added"; + say $out "Added new permission 'manage_identity_providers'"; unless (TableExists('identity_providers')) { $dbh->do(q{ @@ -33,6 +33,8 @@ return { KEY `protocol` (`protocol`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'identity_providers'"; } unless (TableExists('identity_provider_domains')) { @@ -57,6 +59,8 @@ return { CONSTRAINT `identity_provider_domain_ibfk_3` FOREIGN KEY (`default_category_id`) REFERENCES `categories` (`categorycode`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + + say $out "Added new table 'identity_provider_domains'"; } }, }; diff --git a/installer/data/mysql/db_revs/220600083.pl b/installer/data/mysql/db_revs/220600083.pl index 5401cdc697..e23fda8196 100755 --- a/installer/data/mysql/db_revs/220600083.pl +++ b/installer/data/mysql/db_revs/220600083.pl @@ -20,10 +20,14 @@ return { ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; }); + say $out "Added new table 'item_editor_templates'"; + $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others'); }); + + say $out "Added new permission 'manage_item_editor_templates'"; } }, }; -- 2.39.5