Bug 32191: Tidy upgrade scripts output

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomás Cohen Arazi 2022-11-14 12:02:19 -03:00
parent 87391f3e40
commit 7a413f8015
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
53 changed files with 193 additions and 73 deletions

View file

@ -2,16 +2,16 @@ use Modern::Perl;
return { return {
bug_number => "23659", bug_number => "23659",
description => "Add DefaultHoldPickupLocation syspref", description => "Allow hold pickup location to default to item home branch for item-level holds",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
# Do you stuffs here
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES 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') ('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'";
}, },
}; };

View file

@ -5,7 +5,7 @@ return {
description => "Ability to allow guarantor relationship for all patron category types", description => "Ability to allow guarantor relationship for all patron category types",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh) = @$args{qw(dbh)}; my ($dbh,$out) = @$args{qw(dbh out)};
unless ( column_exists( 'categories', 'can_be_guarantee' ) ) { unless ( column_exists( 'categories', 'can_be_guarantee' ) ) {
$dbh->do(q{ $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' ADD COLUMN `can_be_guarantee` tinyint(1) NOT NULL default 0 COMMENT 'if patrons of this category can be guarantees'
AFTER `checkprevcheckout` AFTER `checkprevcheckout`
}); });
say $out "Added column 'categories.can_be_guarantee'";
} }
$dbh->do(q{ $dbh->do(q{

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "24239", bug_number => "24239",
description => "Add due_date to illrequests", description => "Let the ILL module set ad hoc hard due dates",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; 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' ADD COLUMN `due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation'
AFTER `biblio_id` AFTER `biblio_id`
}); });
say $out "Added column 'illrequests.due_date'";
} }
}, },
}; };

View file

@ -13,7 +13,7 @@ return {
COMMENT "patron/borrower's middle name" COMMENT "patron/borrower's middle name"
AFTER firstname AFTER firstname
}); });
say $out "Added middle name column to borrowers table"; say $out "Added column 'borrowers.middle_name'";
} }
if( !column_exists( 'deletedborrowers', 'middle_name' ) ) { if( !column_exists( 'deletedborrowers', 'middle_name' ) ) {
$dbh->do(q{ $dbh->do(q{
@ -22,7 +22,7 @@ return {
COMMENT "patron/borrower's middle name" COMMENT "patron/borrower's middle name"
AFTER firstname 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' ) ) { if( !column_exists( 'borrower_modifications', 'middle_name' ) ) {
$dbh->do(q{ $dbh->do(q{
@ -31,7 +31,7 @@ return {
COMMENT "patron/borrower's middle name" COMMENT "patron/borrower's middle name"
AFTER firstname 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{ my ($default_patron_search_fields) = $dbh->selectrow_array( q{

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "30327", bug_number => "30327",
description => "Add ComponentSortField and ComponentSortOrder sysprefs", description => "Sort component parts",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; 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'), ('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') ('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'";
}, },
}; };

View file

@ -14,6 +14,8 @@ return {
COMMENT 'JSON-serialized context information for the job' COMMENT 'JSON-serialized context information for the job'
AFTER `data` AFTER `data`
}); });
say $out "Added column 'background_jobs.context'";
} }
}, },
}; };

View file

@ -11,5 +11,7 @@ return {
(module,code,branchcode,name,is_html,title,content,message_transport_type,lang) (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') 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)";
}, },
}; };

View file

@ -12,11 +12,15 @@ return {
('EnableItemGroups','0','','Enable the item groups feature','YesNo'); ('EnableItemGroups','0','','Enable the item groups feature','YesNo');
}); });
say $out "Added new system preference 'EnableItemGroups'";
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO permissions (module_bit, code, description) VALUES 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'); ( 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') ) { unless ( TableExists('item_groups') ) {
$dbh->do(q{ $dbh->do(q{
CREATE TABLE `item_groups` ( 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 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; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'item_groups'";
} }
unless ( TableExists('item_group_items') ) { 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 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; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'item_group_items'";
} }
}, },
} }

View file

@ -19,7 +19,8 @@ return {
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ) 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'", {} ); my ($lost_val) = $dbh->selectrow_array( "SELECT MAX(CAST(authorised_value AS SIGNED)) FROM authorised_values WHERE category = 'LOST'", {} );
$lost_val++; $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' ), ( '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') ( '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' ) ) { if( index_exists( 'return_claims', 'issue_id' ) ) {
$dbh->do(q{ $dbh->do(q{

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "28854", bug_number => "28854",
description => "Add new unique index to return claims", description => "Add new 'item_issue' unique index to return claims",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -11,7 +11,6 @@ return {
ALTER TABLE return_claims ALTER TABLE return_claims
ADD UNIQUE KEY item_issue (`itemnumber`,`issue_id`) ADD UNIQUE KEY item_issue (`itemnumber`,`issue_id`)
}); });
say $out "item_issue index added to return_claims";
} }
}, },
}; };

View file

@ -2,12 +2,14 @@ use Modern::Perl;
return { return {
bug_number => 11889, bug_number => 11889,
description => "Add pref ListOwnershipUponPatronDeletion", description => "Add option to keep public or shared lists when deleting patron",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{ $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'); 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'";
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => 30933, bug_number => 30933,
description => "Add pref ListOwnerDesignated", description => "Add a designated owner for shared and public lists at patron deletion",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -10,9 +10,14 @@ return {
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
VALUES ('ListOwnerDesignated', NULL, NULL, 'Designated list owner at patron deletion', 'Free') VALUES ('ListOwnerDesignated', NULL, NULL, 'Designated list owner at patron deletion', 'Free')
}); });
say $out "Added new system preference 'ListOwnerDesignated'";
$dbh->do(q{ $dbh->do(q{
UPDATE systempreferences SET explanation='Defines the action on their public or shared lists when patron is deleted' UPDATE systempreferences SET explanation='Defines the action on their public or shared lists when patron is deleted'
WHERE variable = 'ListOwnershipUponPatronDeletion' WHERE variable = 'ListOwnershipUponPatronDeletion'
}); });
say $out "Updated system preference 'ListOwnershipUponPatronDeletion'";
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "31086", 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 { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "31157", bug_number => "31157",
description => "Add OverdueNoticeFrom preference", description => "Make --frombranch option (overdue_notices.pl) available as a syspref",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -11,5 +11,7 @@ return {
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES 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') ('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'";
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "30650", bug_number => "30650",
description => "Curbside pickup tables", description => "Add Curbside pickup feature",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)}; my ( $dbh, $out ) = @$args{qw(dbh out)};
@ -50,6 +50,8 @@ return {
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
} }
); );
say $out "Added new table 'curbside_pickup_policy'";
} }
unless ( TableExists('curbside_pickup_opening_slots') ) { 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 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; ) 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 $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 (?, ?, ?, ?, ?, ?)}); 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 ) { for my $slot ( @$existing_slots ) {
@ -141,6 +146,8 @@ return {
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
} }
); );
say $out "Added new table 'curbside_pickups'";
} }
unless ( TableExists('curbside_pickup_issues') ) { unless ( TableExists('curbside_pickup_issues') ) {
$dbh->do( $dbh->do(
@ -155,6 +162,8 @@ return {
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
} }
); );
say $out "Added new table 'curbside_pickup_issues'";
} }
$dbh->do( $dbh->do(
q{ q{
@ -162,28 +171,39 @@ return {
} }
); );
say $out "Added new letter 'NEW_CURBSIDE_PICKUP' (email)";
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` ) INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` )
VALUES VALUES
('CurbsidePickup', '0', NULL, 'Enable curbside pickup', 'YesNo') ('CurbsidePickup', '0', NULL, 'Enable curbside pickup', 'YesNo')
}); });
say $out "Added new system preference 'CurbsidePickup'";
$dbh->do(qq{ $dbh->do(qq{
INSERT IGNORE permissions (module_bit, code, description) INSERT IGNORE permissions (module_bit, code, description)
VALUES VALUES
(1, 'manage_curbside_pickups', 'Manage curbside pickups (circulation)') (1, 'manage_curbside_pickups', 'Manage curbside pickups (circulation)')
}); });
say $out "Added new permission 'manage_curbside_pickups' (circulation)";
$dbh->do(qq{ $dbh->do(qq{
INSERT IGNORE permissions (module_bit, code, description) INSERT IGNORE permissions (module_bit, code, description)
VALUES VALUES
(3, 'manage_curbside_pickups', 'Manage curbside pickups (admin)') (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') ) { unless ( column_exists('curbside_pickup_policy', 'enable_waiting_holds_only') ) {
$dbh->do(q{ $dbh->do(q{
ALTER table curbside_pickup_policy ALTER table curbside_pickup_policy
ADD COLUMN enable_waiting_holds_only TINYINT(1) NOT NULL DEFAULT 0 AFTER enabled 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'";
} }
} }
} }

View file

@ -16,6 +16,8 @@ return {
PRIMARY KEY (`hold_cancellation_request_id`) PRIMARY KEY (`hold_cancellation_request_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'hold_cancellation_requests'";
} }
my ($count) = $dbh->selectrow_array(q{ my ($count) = $dbh->selectrow_array(q{

View file

@ -11,7 +11,7 @@ return {
('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'), ('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'); ('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{ $dbh->do(q{
INSERT IGNORE INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type) INSERT IGNORE INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
@ -24,6 +24,7 @@ Author: <<biblio.author>>
Item: <<items.itemcallnumber>> Item: <<items.itemcallnumber>>
Pickup location: <<branches.branchname>>', 'email'); Pickup location: <<branches.branchname>>', 'email');
}); });
say $out "Added HOLD_CHANGED notice";
say $out "Added new letter 'HOLD_CHANGED' (email)";
}, },
}; };

View file

@ -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' ADD COLUMN script varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the name of the cron script that caused this change'
AFTER interface AFTER interface
}); });
say $out "Added column 'action_logs.script'";
} }
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "28269", bug_number => "28269",
description => "Add new system preference SearchWithISSNVariations", description => "Make it possible to search orders with ISSN",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -10,7 +10,8 @@ return {
$dbh->do( q{ $dbh->do( q{
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
VALUES ('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo') VALUES ('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo')
}); });
say $out "Added new system preference 'SearchWithISSNVariations'";
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "30077", bug_number => "30077",
description => "Add new system preference IntranetAddMastheadLibraryPulldown", description => "Add option for library dropdown in search function for staff interface",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -10,5 +10,7 @@ return {
INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`)
VALUES ('IntranetAddMastheadLibraryPulldown','0','','Add a library select pulldown menu on the staff header search','YesNo ') VALUES ('IntranetAddMastheadLibraryPulldown','0','','Add a library select pulldown menu on the staff header search','YesNo ')
}); });
say $out "Added new system preference 'IntranetAddMastheadLibraryPulldown'";
}, },
}; };

View file

@ -16,5 +16,7 @@ return {
END END
WHERE variable='OPACSuggestionAutoFill'; WHERE variable='OPACSuggestionAutoFill';
}); });
say $out "Updated system preference 'OPACSuggestionAutoFill'";
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "29897", bug_number => "29897",
description => "Add new system preference OPACAuthorIdentifiers", description => "Display author identifiers for researchers",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -10,5 +10,7 @@ return {
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
('OPACAuthorIdentifiers','0','','Display author identifiers on the OPAC detail page','YesNo') ('OPACAuthorIdentifiers','0','','Display author identifiers on the OPAC detail page','YesNo')
}); });
say $out "Added new system preference 'OPACAuthorIdentifiers'";
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "28787", bug_number => "28787",
description => "Add new letter 2FA_OTP_TOKEN", description => "Send a notice with the TOTP token",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; 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') ('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)";
}, },
}; };

View file

@ -10,7 +10,8 @@ return {
$dbh->do(q{ $dbh->do(q{
ALTER TABLE aqbooksellers ADD COLUMN type varchar(255) DEFAULT NULL AFTER accountnumber 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{ $dbh->do(q{
INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('VENDOR_TYPE', 1); INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('VENDOR_TYPE', 1);

View file

@ -18,7 +18,7 @@ return {
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) 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{ $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')}); $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');}); $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'";
}, },
}; };

View file

@ -12,6 +12,9 @@ return {
(10, 'manual_invoice', 'Add manual invoices to a patron account') (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{ $dbh->do(q{
INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code) INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code)
SELECT borrowernumber, 10, 'manual_credit' FROM user_permissions WHERE code = 'remaining_permissions' SELECT borrowernumber, 10, 'manual_credit' FROM user_permissions WHERE code = 'remaining_permissions'

View file

@ -6,7 +6,7 @@ return {
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
if( !column_exists( 'suggestions', 'staff_note' ) ) { if ( !column_exists( 'suggestions', 'staff_note' ) ) {
$dbh->do(q{ $dbh->do(q{
ALTER TABLE suggestions ALTER TABLE suggestions
ADD COLUMN staff_note longtext NULL DEFAULT NULL ADD COLUMN staff_note longtext NULL DEFAULT NULL
@ -14,7 +14,7 @@ return {
AFTER note AFTER note
}); });
} }
# Print useful stuff here
say $out "Add staff_note column to suggestions table"; say $out "Added column 'suggestions.staff_note'";
}, },
}; };

View file

@ -10,5 +10,7 @@ return {
$dbh->do(q{ $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<table>\r\n[% IF ( LibraryName ) %]\r\n <tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h3>[% LibraryName | html %]</h3>\r\n </th>\r\n </tr>\r\n[% END %]\r\n <tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h2>[% Branches.GetName( credit.branchcode ) | html %]</h2>\r\n </th>\r\n </tr>\r\n<tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h3>[% credit.date | $KohaDates %]</h3>\r\n</tr>\r\n<tr>\r\n <td>Transaction ID: </td>\r\n <td>[% credit.accountlines_id %]</td>\r\n</tr>\r\n<tr>\r\n <td>Operator ID: </td>\r\n <td>[% credit.manager_id %]</td>\r\n</tr>\r\n<tr>\r\n <td>Payment type: </td>\r\n <td>[% credit.payment_type %]</td>\r\n</tr>\r\n <tr></tr>\r\n <tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h2><u>Fee receipt</u></h2>\r\n </th>\r\n </tr>\r\n <tr></tr>\r\n <tr>\r\n <th>Description of charges</th>\r\n <th>Amount</th>\r\n </tr>\r\n\r\n [% FOREACH debit IN credit.debits %]\r\n <tr>\r\n <td>[% PROCESS account_type_description account=debit %]</td>\r\n <td>[% debit.amount * -1 | $Price %]</td>\r\n </tr>\r\n [% END %]\r\n\r\n<tfoot>\r\n <tr class=\'highlight\'>\r\n <td>Total: </td>\r\n <td>[% credit.amount * -1| $Price %]</td>\r\n </tr>\r\n <tr>\r\n <td>Tendered: </td>\r\n <td>[% collected | $Price %]</td>\r\n </tr>\r\n <tr>\r\n <td>Change: </td>\r\n <td>[% change | $Price %]</td>\r\n </tr>\r\n</tfoot>\r\n</table>\r\n", 'email'); 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<table>\r\n[% IF ( LibraryName ) %]\r\n <tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h3>[% LibraryName | html %]</h3>\r\n </th>\r\n </tr>\r\n[% END %]\r\n <tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h2>[% Branches.GetName( credit.branchcode ) | html %]</h2>\r\n </th>\r\n </tr>\r\n<tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h3>[% credit.date | $KohaDates %]</h3>\r\n</tr>\r\n<tr>\r\n <td>Transaction ID: </td>\r\n <td>[% credit.accountlines_id %]</td>\r\n</tr>\r\n<tr>\r\n <td>Operator ID: </td>\r\n <td>[% credit.manager_id %]</td>\r\n</tr>\r\n<tr>\r\n <td>Payment type: </td>\r\n <td>[% credit.payment_type %]</td>\r\n</tr>\r\n <tr></tr>\r\n <tr>\r\n <th colspan=\'2\' class=\'centerednames\'>\r\n <h2><u>Fee receipt</u></h2>\r\n </th>\r\n </tr>\r\n <tr></tr>\r\n <tr>\r\n <th>Description of charges</th>\r\n <th>Amount</th>\r\n </tr>\r\n\r\n [% FOREACH debit IN credit.debits %]\r\n <tr>\r\n <td>[% PROCESS account_type_description account=debit %]</td>\r\n <td>[% debit.amount * -1 | $Price %]</td>\r\n </tr>\r\n [% END %]\r\n\r\n<tfoot>\r\n <tr class=\'highlight\'>\r\n <td>Total: </td>\r\n <td>[% credit.amount * -1| $Price %]</td>\r\n </tr>\r\n <tr>\r\n <td>Tendered: </td>\r\n <td>[% collected | $Price %]</td>\r\n </tr>\r\n <tr>\r\n <td>Change: </td>\r\n <td>[% change | $Price %]</td>\r\n </tr>\r\n</tfoot>\r\n</table>\r\n", 'email');
}); });
say $out "Added new letter 'RECEIPT' (email)";
}, },
}; };

View file

@ -12,6 +12,6 @@ return {
'Used to autogenerate a Control Number: biblionumber will be as biblionumber; OFF will leave it as is','Choice'); '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'";
}, },
}; };

View file

@ -8,6 +8,7 @@ return {
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES $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')}); ('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'";
}, },
} }

View file

@ -8,9 +8,9 @@ return {
my ($dbh, $out) = @$args{qw(dbh out)}; 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') }); $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') }); $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'";
}, },
}; };

View file

@ -14,8 +14,9 @@ return {
('RequireChoosingExistingAuthority',?,NULL,'Require selecting existing authority entry in controlled fields during cataloging.','YesNo'), ('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') ('AutoLinkBiblios',?,NULL,'If enabled, link biblio to authorities on creation and edit','YesNo')
},undef,($biblio_adds_authorities eq '1' ? '0' : '1', $biblio_adds_authorities)); },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";}); $dbh->do(q{DELETE FROM systempreferences WHERE variable="BiblioAddsAuthorities";});
say $out "BiblioAddsAuthorities removed"; say $out "Removed system preference 'BiblioAddsAuthorities'";
}, },
}; };

View file

@ -12,6 +12,7 @@ return {
ALTER TABLE statistics 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' 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'";
} }
}, },
}; };

View file

@ -7,16 +7,15 @@ return {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; 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');}); $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');}); $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);}); $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); my $ready_id = $dbh->last_insert_id(undef, undef, 'message_attributes', undef);
if (defined $ready_id) { 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, '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, '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');)); $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";
} }
}, },
}; };

View file

@ -8,6 +8,7 @@ return {
my ($dbh, $out) = @$args{qw(dbh out)}; 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') }); $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', $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',
'<h3>New OPAC self-registration</h3> '<h3>New OPAC self-registration</h3>
@ -25,5 +26,7 @@ return {
[% IF borrower.categorycode %]<li>Patron category: [% borrower.categorycode %]</li>[% END %] [% IF borrower.categorycode %]<li>Patron category: [% borrower.categorycode %]</li>[% END %]
</ul> </ul>
</p>', 'email', 'default') }); </p>', 'email', 'default') });
say $out "Added new letter 'OPAC_REG' (email)";
}, },
}; };

View file

@ -10,6 +10,6 @@ return {
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) 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') 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'";
}, },
}; };

View file

@ -6,12 +6,12 @@ return {
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
# Do you stuffs here
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES 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') ('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'";
}, },
}; };

View file

@ -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'); "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 # Add systempreference
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
VALUES ('NotifyPasswordChange','0','','Notify patrons whenever their password is changed.','YesNo') VALUES ('NotifyPasswordChange','0','','Notify patrons whenever their password is changed.','YesNo')
}); });
say $out "Added new system preference 'NotifyPasswordChange'";
}, },
}; };

View file

@ -1,7 +1,7 @@
use Modern::Perl; use Modern::Perl;
return { return {
bug_number => "10950", bug_number => "10950",
description => "Add pronouns to borrowers table", description => "Add preferred pronoun field to patron record",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -12,7 +12,7 @@ return {
COMMENT "patron/borrower's pronouns" COMMENT "patron/borrower's pronouns"
AFTER initials AFTER initials
}); });
say $out "Added pronouns column to borrowers table"; say $out "Added column 'borrowers.pronouns'";
} }
if( !column_exists( 'deletedborrowers', 'pronouns' ) ) { if( !column_exists( 'deletedborrowers', 'pronouns' ) ) {
$dbh->do(q{ $dbh->do(q{
@ -21,7 +21,7 @@ return {
COMMENT "patron/borrower's pronouns" COMMENT "patron/borrower's pronouns"
AFTER initials AFTER initials
}); });
say $out "Added pronouns column to deletedborrowers table"; say $out "Added column 'deletedborrowers.pronouns'";
} }
if( !column_exists( 'borrower_modifications', 'pronouns' ) ) { if( !column_exists( 'borrower_modifications', 'pronouns' ) ) {
$dbh->do(q{ $dbh->do(q{
@ -30,7 +30,7 @@ return {
COMMENT "patron/borrower's pronouns" COMMENT "patron/borrower's pronouns"
AFTER initials AFTER initials
}); });
say $out "Added pronouns column to borrower_modifications table"; say $out "Added column 'borrower_modifications.pronouns'";
} }
}, },
} }

View file

@ -2,11 +2,12 @@ use Modern::Perl;
return { return {
bug_number => "31333", bug_number => "31333",
description => "Add new suggestionPatronCategoryExceptions system preference", description => "Add the ability to limit purchase suggestions by patron category",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; 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') }); $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'";
}, },
}; };

View file

@ -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'); 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{ $dbh->do(q{
UPDATE systempreferences UPDATE systempreferences
SET value=(SELECT CASE WHEN value=1 THEN 'intransit' ELSE '' END FROM systempreferences WHERE variable='OPACInTransitHoldPickupLocationChange') SET value=(SELECT CASE WHEN value=1 THEN 'intransit' ELSE '' END FROM systempreferences WHERE variable='OPACInTransitHoldPickupLocationChange')
WHERE variable='OPACAllowUserToChangeBranch' WHERE variable='OPACAllowUserToChangeBranch'
}); });
say $out "Added new system preference 'OPACAllowUserToChangeBranch'";
$dbh->do(q{ $dbh->do(q{
DELETE FROM systempreferences DELETE FROM systempreferences
WHERE variable = 'OPACInTransitHoldPickupLocationChange' WHERE variable = 'OPACInTransitHoldPickupLocationChange'

View file

@ -13,7 +13,7 @@ return {
ADD CONSTRAINT letter_fk FOREIGN KEY (letter_id) REFERENCES letter(id) ON DELETE SET NULL ON UPDATE CASCADE 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'";
} }
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "17170", bug_number => "17170",
description => "Add permission for creating saved search filters", description => "Add saved search filters feature",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -10,7 +10,9 @@ return {
INSERT IGNORE INTO permissions (module_bit, code, description) VALUES INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
(3, 'manage_search_filters', 'Manage custom search filters'); (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' ) ){ unless( TableExists( 'search_filters' ) ){
$dbh->do(q{ $dbh->do(q{
CREATE TABLE `search_filters` ( CREATE TABLE `search_filters` (
@ -23,14 +25,13 @@ return {
PRIMARY KEY (`search_filter_id`) PRIMARY KEY (`search_filter_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added search_filters table"; say $out "Added new table 'search_filters'";
} else {
say $out "search_filters table already created";
} }
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo') ('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'";
}, },
} }

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "30588", bug_number => "30588",
description => "Add an 'enforce' option for TwoFactorAuthentication", description => "Add an 'enforce' option for 'TwoFactorAuthentication' system preference",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -13,5 +13,7 @@ return {
type="Choice" type="Choice"
WHERE variable="TwoFactorAuthentication" WHERE variable="TwoFactorAuthentication"
}); });
say $out "Updated system preference 'TwoFactorAuthentication'";
}, },
}; };

View file

@ -13,6 +13,6 @@ return {
WHERE variable = "OpacHiddenItemsExceptions" WHERE variable = "OpacHiddenItemsExceptions"
}); });
# Print useful stuff here # Print useful stuff here
say $out "Settings for OpacHiddenItemsExceptions have been updated"; say $out "Updated system preference 'OpacHiddenItemsExceptions'";
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => '30036', bug_number => '30036',
description => 'Add syspref AuthorityXSLTOpacResultsDisplay', description => 'Add XSLT for authority results view in OPAC',
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -11,5 +11,7 @@ return {
INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`)
VALUES ('AuthorityXSLTOpacResultsDisplay','','','Enable XSL stylesheet control over authority results page in the OPAC','Free') VALUES ('AuthorityXSLTOpacResultsDisplay','','','Enable XSL stylesheet control over authority results page in the OPAC','Free')
}); });
say $out "Added new system preference 'AuthorityXSLTOpacResultsDisplay'";
}, },
}; };

View file

@ -6,8 +6,7 @@ return {
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; 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"}); $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";
}, },
}; };

View file

@ -8,6 +8,5 @@ return {
my ($dbh, $out) = @$args{qw(dbh out)}; 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}); $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 "";
}, },
}; };

View file

@ -2,7 +2,7 @@ use Modern::Perl;
return { return {
bug_number => "29792", bug_number => "29792",
description => "Add AutomaticConfirmTransfer system preference", description => "Fix transfers created from 'wrong transfer' checkin are not sent if modal dismissed",
up => sub { up => sub {
my ($args) = @_; my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)}; my ($dbh, $out) = @$args{qw(dbh out)};
@ -10,7 +10,7 @@ return {
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES 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') ('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'";
}, },
}; };

View file

@ -112,6 +112,7 @@ END_CONTENT
INSERT IGNORE INTO letter ( module, code, branchcode, name, is_html, title, content, message_transport_type, lang) 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' ) 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)";
}, },
}; };

View file

@ -12,11 +12,15 @@ return {
VALUES ('ERMModule', '0', NULL, 'Enable the E-Resource management module', 'YesNo'); VALUES ('ERMModule', '0', NULL, 'Enable the E-Resource management module', 'YesNo');
}); });
say $out "Added new system preference 'ERMModule'";
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton)
VALUES (28, 'erm', 'Manage electronic resources', 0) VALUES (28, 'erm', 'Manage electronic resources', 0)
}); });
say $out "Added new permission 'erm'";
unless ( TableExists('erm_agreements') ) { unless ( TableExists('erm_agreements') ) {
$dbh->do(q{ $dbh->do(q{
CREATE TABLE `erm_agreements` ( CREATE TABLE `erm_agreements` (
@ -33,6 +37,8 @@ return {
PRIMARY KEY(`agreement_id`) PRIMARY KEY(`agreement_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_agreements'";
} }
$dbh->do(q{ $dbh->do(q{
@ -68,6 +74,8 @@ return {
PRIMARY KEY(`agreement_period_id`) PRIMARY KEY(`agreement_period_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_agreement_periods'";
} }
unless ( TableExists('erm_licenses') ) { unless ( TableExists('erm_licenses') ) {
$dbh->do(q{ $dbh->do(q{
@ -84,6 +92,8 @@ return {
PRIMARY KEY(`license_id`) PRIMARY KEY(`license_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_licenses'";
} }
unless ( TableExists('erm_agreement_licenses') ) { unless ( TableExists('erm_agreement_licenses') ) {
$dbh->do(q{ $dbh->do(q{
@ -101,6 +111,8 @@ return {
UNIQUE KEY `erm_agreement_licenses_uniq` (`agreement_id`, `license_id`) UNIQUE KEY `erm_agreement_licenses_uniq` (`agreement_id`, `license_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_agreement_licenses'";
} }
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO authorised_value_categories (category_name, is_system) 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 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; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_user_roles'";
} }
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO authorised_value_categories (category_name, is_system) INSERT IGNORE INTO authorised_value_categories (category_name, is_system)
@ -167,6 +181,8 @@ return {
PRIMARY KEY(`agreement_id`, `related_agreement_id`) PRIMARY KEY(`agreement_id`, `related_agreement_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_agreement_relationships'";
} }
unless ( TableExists('erm_documents') ) { unless ( TableExists('erm_documents') ) {
@ -188,6 +204,8 @@ return {
PRIMARY KEY(`document_id`) PRIMARY KEY(`document_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_documents'";
} }
unless ( TableExists('erm_eholdings_packages') ) { unless ( TableExists('erm_eholdings_packages') ) {
@ -206,6 +224,8 @@ return {
PRIMARY KEY(`package_id`) PRIMARY KEY(`package_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_eholdings_packages'";
} }
unless ( TableExists('erm_eholdings_packages_agreements') ) { 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 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; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_eholdings_packages_agreements'";
} }
unless ( TableExists('erm_eholdings_titles') ) { unless ( TableExists('erm_eholdings_titles') ) {
@ -254,6 +276,8 @@ return {
PRIMARY KEY(`title_id`) PRIMARY KEY(`title_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_eholdings_titles'";
} }
unless ( TableExists('erm_eholdings_resources') ) { unless ( TableExists('erm_eholdings_resources') ) {
$dbh->do(q{ $dbh->do(q{
@ -272,6 +296,8 @@ return {
PRIMARY KEY(`resource_id`) PRIMARY KEY(`resource_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'erm_eholdings_resources'";
} }
unless ( column_exists('aqbooksellers', 'external_id') ) { unless ( column_exists('aqbooksellers', 'external_id') ) {
@ -280,6 +306,8 @@ return {
ADD COLUMN `external_id` VARCHAR(255) DEFAULT NULL ADD COLUMN `external_id` VARCHAR(255) DEFAULT NULL
AFTER `deliverytime` AFTER `deliverytime`
}); });
say $out "Added column 'aqbooksellers.external_id'";
} }
$dbh->do(q{ $dbh->do(q{
@ -325,6 +353,9 @@ return {
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
VALUES ('ERMProviders', 'local', 'local|ebsco', 'Set the providers for the ERM module', 'multiple'); VALUES ('ERMProviders', 'local', 'local|ebsco', 'Set the providers for the ERM module', 'multiple');
}); });
say $out "Added new system preference 'ERMProviders'";
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
VALUES VALUES
@ -332,6 +363,7 @@ return {
('ERMProviderEbscoApiKey', '', '', 'API key for EBSCO', 'free'); ('ERMProviderEbscoApiKey', '', '', 'API key for EBSCO', 'free');
}); });
say $out "Added new system preference 'ERMProviderEbscoCustomerID'";
say $out "Added new system preference 'ERMProviderEbscoApiKey'";
} }
}; };

View file

@ -15,7 +15,7 @@ return {
( 3, 'manage_identity_providers', 'Manage authentication providers') ( 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')) { unless (TableExists('identity_providers')) {
$dbh->do(q{ $dbh->do(q{
@ -33,6 +33,8 @@ return {
KEY `protocol` (`protocol`) KEY `protocol` (`protocol`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'identity_providers'";
} }
unless (TableExists('identity_provider_domains')) { 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 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; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'identity_provider_domains'";
} }
}, },
}; };

View file

@ -20,10 +20,14 @@ return {
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
}); });
say $out "Added new table 'item_editor_templates'";
$dbh->do(q{ $dbh->do(q{
INSERT IGNORE INTO permissions (module_bit, code, description) VALUES INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others'); ( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others');
}); });
say $out "Added new permission 'manage_item_editor_templates'";
} }
}, },
}; };