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

(-)a/installer/data/mysql/db_revs/220600001.pl (-4 / +4 lines)
Lines 2-17 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "23659",
4
    bug_number => "23659",
5
    description => "Add DefaultHoldPickupLocation syspref",
5
    description => "Allow hold pickup location to default to item home branch for item-level holds",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
9
10
        $dbh->do(q{
10
        $dbh->do(q{
11
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
12
            ('DefaultHoldPickupLocation','loggedinlibrary','loggedinlibrary|homebranch|holdingbranch','Which branch should a hold pickup location default to. ','choice')
12
            ('DefaultHoldPickupLocation','loggedinlibrary','loggedinlibrary|homebranch|holdingbranch','Which branch should a hold pickup location default to. ','choice')
13
        });
13
        });
14
        # Print useful stuff here
14
15
        say $out "Added DefaultHoldPickupLocation syspref";
15
        say $out "Added new system preference 'DefaultHoldPickupLocation'";
16
    },
16
    },
17
};
17
};
(-)a/installer/data/mysql/db_revs/220600004.pl (-1 / +2 lines)
Lines 5-11 return { Link Here
5
    description => "Ability to allow guarantor relationship for all patron category types",
5
    description => "Ability to allow guarantor relationship for all patron category types",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh) = @$args{qw(dbh)};
8
        my ($dbh,$out) = @$args{qw(dbh out)};
9
9
10
        unless ( column_exists( 'categories', 'can_be_guarantee' ) ) {
10
        unless ( column_exists( 'categories', 'can_be_guarantee' ) ) {
11
            $dbh->do(q{
11
            $dbh->do(q{
Lines 13-18 return { Link Here
13
                    ADD COLUMN `can_be_guarantee` tinyint(1) NOT NULL default 0 COMMENT 'if patrons of this category can be guarantees'
13
                    ADD COLUMN `can_be_guarantee` tinyint(1) NOT NULL default 0 COMMENT 'if patrons of this category can be guarantees'
14
                    AFTER `checkprevcheckout`
14
                    AFTER `checkprevcheckout`
15
            });
15
            });
16
            say $out "Added column 'categories.can_be_guarantee'";
16
        }
17
        }
17
18
18
        $dbh->do(q{
19
        $dbh->do(q{
(-)a/installer/data/mysql/db_revs/220600005.pl (-1 / +3 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number  => "24239",
4
    bug_number  => "24239",
5
    description => "Add due_date to illrequests",
5
    description => "Let the ILL module set ad hoc hard due dates",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 13-18 return { Link Here
13
                    ADD COLUMN `due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation'
13
                    ADD COLUMN `due_date` datetime DEFAULT NULL COMMENT 'Custom date due specified by backend, leave NULL for default date_due calculation'
14
                    AFTER `biblio_id`
14
                    AFTER `biblio_id`
15
            });
15
            });
16
17
            say $out "Added column 'illrequests.due_date'";
16
        }
18
        }
17
    },
19
    },
18
};
20
};
(-)a/installer/data/mysql/db_revs/220600006.pl (-3 / +3 lines)
Lines 13-19 return { Link Here
13
                COMMENT "patron/borrower's middle name"
13
                COMMENT "patron/borrower's middle name"
14
                AFTER firstname
14
                AFTER firstname
15
            });
15
            });
16
            say $out "Added middle name column to borrowers table";
16
            say $out "Added column 'borrowers.middle_name'";
17
        }
17
        }
18
        if( !column_exists( 'deletedborrowers', 'middle_name' ) ) {
18
        if( !column_exists( 'deletedborrowers', 'middle_name' ) ) {
19
            $dbh->do(q{
19
            $dbh->do(q{
Lines 22-28 return { Link Here
22
                COMMENT "patron/borrower's middle name"
22
                COMMENT "patron/borrower's middle name"
23
                AFTER firstname
23
                AFTER firstname
24
            });
24
            });
25
            say $out "Added middle name column to deletedborrowers table";
25
            say $out "Added column 'deletedborrowers.middle_name'";
26
        }
26
        }
27
        if( !column_exists( 'borrower_modifications', 'middle_name' ) ) {
27
        if( !column_exists( 'borrower_modifications', 'middle_name' ) ) {
28
            $dbh->do(q{
28
            $dbh->do(q{
Lines 31-37 return { Link Here
31
                COMMENT "patron/borrower's middle name"
31
                COMMENT "patron/borrower's middle name"
32
                AFTER firstname
32
                AFTER firstname
33
            });
33
            });
34
            say $out "Added middle name column to borrower_modifications table";
34
            say $out "Added column 'borrower_modifications.middle_name'";
35
        }
35
        }
36
36
37
        my ($default_patron_search_fields) = $dbh->selectrow_array( q{
37
        my ($default_patron_search_fields) = $dbh->selectrow_array( q{
(-)a/installer/data/mysql/db_revs/220600008.pl (-2 / +4 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "30327",
4
    bug_number => "30327",
5
    description => "Add ComponentSortField and ComponentSortOrder sysprefs",
5
    description => "Sort component parts",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 11-16 return { Link Here
11
            ('ComponentSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
11
            ('ComponentSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
12
            ('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice')
12
            ('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice')
13
        });
13
        });
14
        say $out "Added ComponentSortField and ComponentSortOrder sysprefs";
14
15
        say $out "Added new system preference 'ComponentSortField'";
16
        say $out "Added new system preference 'ComponentSortOrder'";
15
    },
17
    },
16
};
18
};
(-)a/installer/data/mysql/db_revs/220600009.pl (+2 lines)
Lines 14-19 return { Link Here
14
                    COMMENT 'JSON-serialized context information for the job'
14
                    COMMENT 'JSON-serialized context information for the job'
15
                    AFTER `data`
15
                    AFTER `data`
16
            });
16
            });
17
18
            say $out "Added column 'background_jobs.context'";
17
        }
19
        }
18
    },
20
    },
19
};
21
};
(-)a/installer/data/mysql/db_revs/220600013.pl (+2 lines)
Lines 11-15 return { Link Here
11
            (module,code,branchcode,name,is_html,title,content,message_transport_type,lang)
11
            (module,code,branchcode,name,is_html,title,content,message_transport_type,lang)
12
            VALUES ('circulation','OVERDUE_FINE_DESC','','Overdue item fine description',0,'Overdue item fine description','[% item.biblio.title %] [% checkout.date_due | $KohaDates %]','print','default')
12
            VALUES ('circulation','OVERDUE_FINE_DESC','','Overdue item fine description',0,'Overdue item fine description','[% item.biblio.title %] [% checkout.date_due | $KohaDates %]','print','default')
13
        });
13
        });
14
15
        say $out "Added new letter 'OVERDUE_FINE_DESC' (print)";
14
    },
16
    },
15
};
17
};
(-)a/installer/data/mysql/db_revs/220600014.pl (+8 lines)
Lines 12-22 return { Link Here
12
            ('EnableItemGroups','0','','Enable the item groups feature','YesNo');
12
            ('EnableItemGroups','0','','Enable the item groups feature','YesNo');
13
        });
13
        });
14
14
15
        say $out "Added new system preference 'EnableItemGroups'";
16
15
        $dbh->do(q{
17
        $dbh->do(q{
16
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
18
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
17
            ( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups');
19
            ( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups');
18
        });
20
        });
19
21
22
        say $out "Added new permission 'manage_item_groups'";
23
20
        unless ( TableExists('item_groups') ) {
24
        unless ( TableExists('item_groups') ) {
21
            $dbh->do(q{
25
            $dbh->do(q{
22
                CREATE TABLE `item_groups` (
26
                CREATE TABLE `item_groups` (
Lines 30-35 return { Link Here
30
                    CONSTRAINT `item_groups_ibfk_1` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
34
                    CONSTRAINT `item_groups_ibfk_1` FOREIGN KEY (`biblio_id`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE
31
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
35
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
32
            });
36
            });
37
38
            say $out "Added new table 'item_groups'";
33
        }
39
        }
34
40
35
        unless ( TableExists('item_group_items') ) {
41
        unless ( TableExists('item_group_items') ) {
Lines 44-49 return { Link Here
44
                    CONSTRAINT `item_group_items_gifk_1` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE CASCADE ON UPDATE CASCADE
50
                    CONSTRAINT `item_group_items_gifk_1` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE CASCADE ON UPDATE CASCADE
45
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
51
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
46
            });
52
            });
53
54
            say $out "Added new table 'item_group_items'";
47
        }
55
        }
48
    },
56
    },
49
}
57
}
(-)a/installer/data/mysql/db_revs/220600015.pl (-2 / +5 lines)
Lines 19-25 return { Link Here
19
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
19
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
20
            });
20
            });
21
        }
21
        }
22
        say $out "item_bundles table added";
22
23
        say $out "Added new table 'item_bundles'";
23
24
24
        my ($lost_val) = $dbh->selectrow_array( "SELECT MAX(CAST(authorised_value AS SIGNED)) FROM authorised_values WHERE category = 'LOST'", {} );
25
        my ($lost_val) = $dbh->selectrow_array( "SELECT MAX(CAST(authorised_value AS SIGNED)) FROM authorised_values WHERE category = 'LOST'", {} );
25
        $lost_val++;
26
        $lost_val++;
Lines 43-49 return { Link Here
43
              ( 'BundleLostValue', $lost_val, '', 'Sets the LOST AV value that represents "Missing from bundle" as a lost value', 'Free' ),
44
              ( 'BundleLostValue', $lost_val, '', 'Sets the LOST AV value that represents "Missing from bundle" as a lost value', 'Free' ),
44
              ( 'BundleNotLoanValue', $nfl_val, '', 'Sets the NOT_LOAN AV value that represents "Added to bundle" as a not for loan value', 'Free')
45
              ( 'BundleNotLoanValue', $nfl_val, '', 'Sets the NOT_LOAN AV value that represents "Added to bundle" as a not for loan value', 'Free')
45
        });
46
        });
46
        say $out "System preferences added and set";
47
48
        say $out "Added new system preference 'BundleLostValue'";
49
        say $out "Added new system preference 'BundleNotLoanValue'";
47
50
48
        if( index_exists( 'return_claims', 'issue_id' ) ) {
51
        if( index_exists( 'return_claims', 'issue_id' ) ) {
49
            $dbh->do(q{
52
            $dbh->do(q{
(-)a/installer/data/mysql/db_revs/220600016.pl (-2 / +1 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "28854",
4
    bug_number => "28854",
5
    description => "Add new unique index to return claims",
5
    description => "Add new 'item_issue' unique index to return claims",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 11-17 return { Link Here
11
                ALTER TABLE return_claims
11
                ALTER TABLE return_claims
12
                ADD UNIQUE KEY item_issue (`itemnumber`,`issue_id`)
12
                ADD UNIQUE KEY item_issue (`itemnumber`,`issue_id`)
13
            });
13
            });
14
            say $out "item_issue index added to return_claims";
15
        }
14
        }
16
    },
15
    },
17
};
16
};
(-)a/installer/data/mysql/db_revs/220600018.pl (-1 / +4 lines)
Lines 2-13 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => 11889,
4
    bug_number => 11889,
5
    description => "Add pref ListOwnershipUponPatronDeletion",
5
    description => "Add option to keep public or shared lists when deleting patron",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
9
        $dbh->do(q{
10
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');
10
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');
11
        });
11
        });
12
13
        say $out "Added new system preference 'ListOwnershipUponPatronDeletion'";
12
    },
14
    },
13
};
15
};
16
(-)a/installer/data/mysql/db_revs/220600019.pl (-1 / +6 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => 30933,
4
    bug_number => 30933,
5
    description => "Add pref ListOwnerDesignated",
5
    description => "Add a designated owner for shared and public lists at patron deletion",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 10-18 return { Link Here
10
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
10
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
11
VALUES ('ListOwnerDesignated', NULL, NULL, 'Designated list owner at patron deletion', 'Free')
11
VALUES ('ListOwnerDesignated', NULL, NULL, 'Designated list owner at patron deletion', 'Free')
12
        });
12
        });
13
14
        say $out "Added new system preference 'ListOwnerDesignated'";
15
13
        $dbh->do(q{
16
        $dbh->do(q{
14
UPDATE systempreferences SET explanation='Defines the action on their public or shared lists when patron is deleted'
17
UPDATE systempreferences SET explanation='Defines the action on their public or shared lists when patron is deleted'
15
WHERE variable = 'ListOwnershipUponPatronDeletion'
18
WHERE variable = 'ListOwnershipUponPatronDeletion'
16
        });
19
        });
20
21
        say $out "Updated system preference 'ListOwnershipUponPatronDeletion'";
17
    },
22
    },
18
};
23
};
(-)a/installer/data/mysql/db_revs/220600020.pl (-1 / +1 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "31086",
4
    bug_number => "31086",
5
    description => "Do not allow null values in branchcodes for reserves",
5
    description => "Do not allow NULL values in branchcodes for reserves",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
(-)a/installer/data/mysql/db_revs/220600021.pl (-1 / +3 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "31157",
4
    bug_number => "31157",
5
    description => "Add OverdueNoticeFrom preference",
5
    description => "Make --frombranch option (overdue_notices.pl) available as a syspref",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 11-15 return { Link Here
11
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
12
                ('OverdueNoticeFrom', 'cron', 'cron|item-issuebranch|item-homebranch', 'Organize and send overdue notices by item home library or checkout library', 'Choice')
12
                ('OverdueNoticeFrom', 'cron', 'cron|item-issuebranch|item-homebranch', 'Organize and send overdue notices by item home library or checkout library', 'Choice')
13
        });
13
        });
14
15
        say $out "Added new system preference 'OverdueNoticeFrom'";
14
    },
16
    },
15
};
17
};
(-)a/installer/data/mysql/db_revs/220600022.pl (-1 / +21 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number  => "30650",
4
    bug_number  => "30650",
5
    description => "Curbside pickup tables",
5
    description => "Add Curbside pickup feature",
6
    up          => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
Lines 50-55 return { Link Here
50
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
50
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
51
        }
51
        }
52
            );
52
            );
53
54
            say $out "Added new table 'curbside_pickup_policy'";
53
        }
55
        }
54
56
55
        unless ( TableExists('curbside_pickup_opening_slots') ) {
57
        unless ( TableExists('curbside_pickup_opening_slots') ) {
Lines 66-71 return { Link Here
66
                    FOREIGN KEY (curbside_pickup_policy_id) REFERENCES curbside_pickup_policy(id) ON DELETE CASCADE ON UPDATE CASCADE
68
                    FOREIGN KEY (curbside_pickup_policy_id) REFERENCES curbside_pickup_policy(id) ON DELETE CASCADE ON UPDATE CASCADE
67
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
69
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
68
            });
70
            });
71
72
            say $out "Added new table 'curbside_pickup_opening_slots'";
73
69
            my $existing_slots = $dbh->selectall_arrayref(q{SELECT * FROM curbside_pickup_policy}, { Slice => {} });
74
            my $existing_slots = $dbh->selectall_arrayref(q{SELECT * FROM curbside_pickup_policy}, { Slice => {} });
70
            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 (?, ?, ?, ?, ?, ?)});
75
            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 (?, ?, ?, ?, ?, ?)});
71
            for my $slot ( @$existing_slots ) {
76
            for my $slot ( @$existing_slots ) {
Lines 141-146 return { Link Here
141
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
146
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
142
            }
147
            }
143
            );
148
            );
149
150
            say $out "Added new table 'curbside_pickups'";
144
        }
151
        }
145
        unless ( TableExists('curbside_pickup_issues') ) {
152
        unless ( TableExists('curbside_pickup_issues') ) {
146
            $dbh->do(
153
            $dbh->do(
Lines 155-160 return { Link Here
155
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
162
            ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
156
                }
163
                }
157
            );
164
            );
165
166
            say $out "Added new table 'curbside_pickup_issues'";
158
        }
167
        }
159
        $dbh->do(
168
        $dbh->do(
160
            q{
169
            q{
Lines 162-189 return { Link Here
162
            }
171
            }
163
        );
172
        );
164
173
174
        say $out "Added new letter 'NEW_CURBSIDE_PICKUP' (email)";
175
165
        $dbh->do(q{
176
        $dbh->do(q{
166
            INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` )
177
            INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type` )
167
            VALUES
178
            VALUES
168
            ('CurbsidePickup', '0', NULL, 'Enable curbside pickup', 'YesNo')
179
            ('CurbsidePickup', '0', NULL, 'Enable curbside pickup', 'YesNo')
169
        });
180
        });
170
181
182
        say $out "Added new system preference 'CurbsidePickup'";
183
171
        $dbh->do(qq{
184
        $dbh->do(qq{
172
            INSERT IGNORE permissions (module_bit, code, description)
185
            INSERT IGNORE permissions (module_bit, code, description)
173
            VALUES
186
            VALUES
174
            (1, 'manage_curbside_pickups', 'Manage curbside pickups (circulation)')
187
            (1, 'manage_curbside_pickups', 'Manage curbside pickups (circulation)')
175
        });
188
        });
189
190
        say $out "Added new permission 'manage_curbside_pickups' (circulation)";
191
176
        $dbh->do(qq{
192
        $dbh->do(qq{
177
            INSERT IGNORE permissions (module_bit, code, description)
193
            INSERT IGNORE permissions (module_bit, code, description)
178
            VALUES
194
            VALUES
179
            (3, 'manage_curbside_pickups', 'Manage curbside pickups (admin)')
195
            (3, 'manage_curbside_pickups', 'Manage curbside pickups (admin)')
180
        });
196
        });
181
197
198
        say $out "Added new permission 'manage_curbside_pickups' (admin)";
199
182
        unless ( column_exists('curbside_pickup_policy', 'enable_waiting_holds_only') ) {
200
        unless ( column_exists('curbside_pickup_policy', 'enable_waiting_holds_only') ) {
183
            $dbh->do(q{
201
            $dbh->do(q{
184
                ALTER table curbside_pickup_policy
202
                ALTER table curbside_pickup_policy
185
                ADD COLUMN enable_waiting_holds_only TINYINT(1) NOT NULL DEFAULT 0 AFTER enabled
203
                ADD COLUMN enable_waiting_holds_only TINYINT(1) NOT NULL DEFAULT 0 AFTER enabled
186
            });
204
            });
205
206
            say $out "Added column 'curbside_pickup_policy.enable_waiting_holds_only'";
187
        }
207
        }
188
    }
208
    }
189
  }
209
  }
(-)a/installer/data/mysql/db_revs/220600023.pl (+2 lines)
Lines 16-21 return { Link Here
16
                PRIMARY KEY (`hold_cancellation_request_id`)
16
                PRIMARY KEY (`hold_cancellation_request_id`)
17
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
17
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
18
            });
18
            });
19
20
            say $out "Added new table 'hold_cancellation_requests'";
19
        }
21
        }
20
22
21
        my ($count) = $dbh->selectrow_array(q{
23
        my ($count) = $dbh->selectrow_array(q{
(-)a/installer/data/mysql/db_revs/220600025.pl (-2 / +3 lines)
Lines 11-17 return { Link Here
11
            ('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'),
11
            ('ExpireReservesAutoFill','0',NULL,'Automatically fill the next hold with a automatically canceled expired waiting hold.','YesNo'),
12
            ('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');
12
            ('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');
13
        });
13
        });
14
        say $out "Added ExpireReservesAutoFill system preferences";
14
        say $out "Added new system preference 'ExpireReservesAutoFill'";
15
15
16
        $dbh->do(q{
16
        $dbh->do(q{
17
        INSERT IGNORE INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
17
        INSERT IGNORE INTO letter(module,code,branchcode,name,is_html,title,content,message_transport_type)
Lines 24-29 Author: <<biblio.author>> Link Here
24
Item: <<items.itemcallnumber>>
24
Item: <<items.itemcallnumber>>
25
Pickup location: <<branches.branchname>>', 'email');
25
Pickup location: <<branches.branchname>>', 'email');
26
        });
26
        });
27
        say $out "Added HOLD_CHANGED notice";
27
28
        say $out "Added new letter 'HOLD_CHANGED' (email)";
28
    },
29
    },
29
};
30
};
(-)a/installer/data/mysql/db_revs/220600026.pl (+1 lines)
Lines 12-17 return { Link Here
12
                ADD COLUMN script varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the name of the cron script that caused this change'
12
                ADD COLUMN script varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'the name of the cron script that caused this change'
13
                AFTER interface
13
                AFTER interface
14
            });
14
            });
15
            say $out "Added column 'action_logs.script'";
15
        }
16
        }
16
    },
17
    },
17
};
18
};
(-)a/installer/data/mysql/db_revs/220600027.pl (-2 / +3 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "28269",
4
    bug_number => "28269",
5
    description => "Add new system preference SearchWithISSNVariations",
5
    description => "Make it possible to search orders with ISSN",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 10-16 return { Link Here
10
        $dbh->do( q{
10
        $dbh->do( q{
11
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
11
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
12
            VALUES ('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo')
12
            VALUES ('SearchWithISSNVariations','0',NULL,'If enabled, search on all variations of the ISSN','YesNo')
13
14
        });
13
        });
14
15
        say $out "Added new system preference 'SearchWithISSNVariations'";
15
    },
16
    },
16
};
17
};
(-)a/installer/data/mysql/db_revs/220600028.pl (-1 / +3 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "30077",
4
    bug_number => "30077",
5
    description => "Add new system preference IntranetAddMastheadLibraryPulldown",
5
    description => "Add option for library dropdown in search function for staff interface",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 10-14 return { Link Here
10
            INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`)
10
            INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`)
11
            VALUES ('IntranetAddMastheadLibraryPulldown','0','','Add a library select pulldown menu on the staff header search','YesNo ')
11
            VALUES ('IntranetAddMastheadLibraryPulldown','0','','Add a library select pulldown menu on the staff header search','YesNo ')
12
        });
12
        });
13
14
        say $out "Added new system preference 'IntranetAddMastheadLibraryPulldown'";
13
    },
15
    },
14
};
16
};
(-)a/installer/data/mysql/db_revs/220600030.pl (+2 lines)
Lines 16-20 return { Link Here
16
                        END
16
                        END
17
            WHERE variable='OPACSuggestionAutoFill';
17
            WHERE variable='OPACSuggestionAutoFill';
18
        });
18
        });
19
20
        say $out "Updated system preference 'OPACSuggestionAutoFill'";
19
    },
21
    },
20
};
22
};
(-)a/installer/data/mysql/db_revs/220600034.pl (-1 / +3 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "29897",
4
    bug_number => "29897",
5
    description => "Add new system preference OPACAuthorIdentifiers",
5
    description => "Display author identifiers for researchers",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 10-14 return { Link Here
10
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
10
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
            ('OPACAuthorIdentifiers','0','','Display author identifiers on the OPAC detail page','YesNo')
11
            ('OPACAuthorIdentifiers','0','','Display author identifiers on the OPAC detail page','YesNo')
12
        });
12
        });
13
14
        say $out "Added new system preference 'OPACAuthorIdentifiers'";
13
    },
15
    },
14
};
16
};
(-)a/installer/data/mysql/db_revs/220600035.pl (-1 / +2 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "28787",
4
    bug_number => "28787",
5
    description => "Add new letter 2FA_OTP_TOKEN",
5
    description => "Send a notice with the TOTP token",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 11-15 return { Link Here
11
            ('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')
11
            ('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')
12
        });
12
        });
13
13
14
        say $out "Added new letter '2FA_OTP_TOKEN' (email)";
14
    },
15
    },
15
};
16
};
(-)a/installer/data/mysql/db_revs/220600036.pl (-1 / +2 lines)
Lines 10-16 return { Link Here
10
            $dbh->do(q{
10
            $dbh->do(q{
11
                ALTER TABLE aqbooksellers ADD COLUMN type varchar(255) DEFAULT NULL AFTER accountnumber
11
                ALTER TABLE aqbooksellers ADD COLUMN type varchar(255) DEFAULT NULL AFTER accountnumber
12
            });
12
            });
13
            say $out "Added type column to aqbooksellers";
13
14
            say $out "Added column 'aqbooksellers.type'";
14
        }
15
        }
15
        $dbh->do(q{
16
        $dbh->do(q{
16
            INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('VENDOR_TYPE', 1);
17
            INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('VENDOR_TYPE', 1);
(-)a/installer/data/mysql/db_revs/220600037.pl (-3 / +3 lines)
Lines 18-24 return { Link Here
18
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
18
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
19
            });
19
            });
20
20
21
            say $out "Added restriction_types table";
21
            say $out "Added new table 'restriction_types'";
22
        }
22
        }
23
23
24
        $dbh->do(q{
24
        $dbh->do(q{
Lines 44-52 return { Link Here
44
        }
44
        }
45
45
46
        $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_patron_restrictions', 'Manage patron restrictions')});
46
        $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_patron_restrictions', 'Manage patron restrictions')});
47
        say $out "Added manage_patron_restrictions permission";
47
        say $out "Added new permission 'manage_patron_restrictions'";
48
48
49
        $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');});
49
        $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');});
50
        say $out "Added PatronRestrictionTypes preference";
50
        say $out "Added new system preference 'PatronRestrictionTypes'";
51
    },
51
    },
52
};
52
};
(-)a/installer/data/mysql/db_revs/220600038.pl (+3 lines)
Lines 12-17 return { Link Here
12
            (10, 'manual_invoice', 'Add manual invoices to a patron account')
12
            (10, 'manual_invoice', 'Add manual invoices to a patron account')
13
        });
13
        });
14
14
15
        say $out "Added new permission 'manual_credit'";
16
        say $out "Added new permission 'manual_invoice'";
17
15
        $dbh->do(q{
18
        $dbh->do(q{
16
            INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code)
19
            INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code)
17
            SELECT borrowernumber, 10, 'manual_credit' FROM user_permissions WHERE code = 'remaining_permissions'
20
            SELECT borrowernumber, 10, 'manual_credit' FROM user_permissions WHERE code = 'remaining_permissions'
(-)a/installer/data/mysql/db_revs/220600039.pl (-3 / +3 lines)
Lines 6-12 return { Link Here
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        if( !column_exists( 'suggestions', 'staff_note' ) ) {
9
        if ( !column_exists( 'suggestions', 'staff_note' ) ) {
10
            $dbh->do(q{
10
            $dbh->do(q{
11
                    ALTER TABLE suggestions
11
                    ALTER TABLE suggestions
12
                    ADD COLUMN staff_note longtext NULL DEFAULT NULL
12
                    ADD COLUMN staff_note longtext NULL DEFAULT NULL
Lines 14-20 return { Link Here
14
                    AFTER note
14
                    AFTER note
15
            });
15
            });
16
        }
16
        }
17
        # Print useful stuff here
17
18
        say $out "Add staff_note column to suggestions table";
18
        say $out "Added column 'suggestions.staff_note'";
19
    },
19
    },
20
};
20
};
(-)a/installer/data/mysql/db_revs/220600040.pl (+2 lines)
Lines 10-14 return { Link Here
10
        $dbh->do(q{
10
        $dbh->do(q{
11
             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');
11
             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');
12
        });
12
        });
13
14
        say $out "Added new letter 'RECEIPT' (email)";
13
    },
15
    },
14
};
16
};
(-)a/installer/data/mysql/db_revs/220600042.pl (-1 / +1 lines)
Lines 12-17 return { Link Here
12
            'Used to autogenerate a Control Number: biblionumber will be as biblionumber; OFF will leave it as is','Choice');
12
            'Used to autogenerate a Control Number: biblionumber will be as biblionumber; OFF will leave it as is','Choice');
13
        });
13
        });
14
14
15
        say $out "Added system preference autoControlNumber";
15
        say $out "Added new system preference 'autoControlNumber'";
16
    },
16
    },
17
};
17
};
(-)a/installer/data/mysql/db_revs/220600043.pl (-1 / +2 lines)
Lines 8-13 return { Link Here
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
9
        $dbh->do(q{INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
10
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo')});
10
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo')});
11
        say $out "Syspref UseLocationAsAQInSIP has been added";
11
12
        say $out "Added new system preference 'UseLocationAsAQInSIP'";
12
    },
13
    },
13
}
14
}
(-)a/installer/data/mysql/db_revs/220600044.pl (-2 / +2 lines)
Lines 8-16 return { Link Here
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
9
10
        $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') });
10
        $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') });
11
        say $out "Added `RetainCatalogSearchTerms` preference";
11
        say $out "Added new system preference 'RetainCatalogSearchTerms'";
12
12
13
        $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') });
13
        $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') });
14
        say $out "Added `RetainPatronsSearchTerms` preference";
14
        say $out "Added new system preference 'RetainPatronSearchTerms'";
15
    },
15
    },
16
};
16
};
(-)a/installer/data/mysql/db_revs/220600047.pl (-2 / +3 lines)
Lines 14-21 return { Link Here
14
            ('RequireChoosingExistingAuthority',?,NULL,'Require selecting existing authority entry in controlled fields during cataloging.','YesNo'),
14
            ('RequireChoosingExistingAuthority',?,NULL,'Require selecting existing authority entry in controlled fields during cataloging.','YesNo'),
15
            ('AutoLinkBiblios',?,NULL,'If enabled, link biblio to authorities on creation and edit','YesNo')
15
            ('AutoLinkBiblios',?,NULL,'If enabled, link biblio to authorities on creation and edit','YesNo')
16
        },undef,($biblio_adds_authorities eq '1' ? '0' : '1', $biblio_adds_authorities));
16
        },undef,($biblio_adds_authorities eq '1' ? '0' : '1', $biblio_adds_authorities));
17
        say $out "Added RequireChoosingExistingAuthority and AutoLinkBiblios";
17
        say $out "Added new system preference 'RequireChoosingExistingAuthority'";
18
        say $out "Added new system preference 'AutoLinkBiblios'";
18
        $dbh->do(q{DELETE FROM systempreferences WHERE variable="BiblioAddsAuthorities";});
19
        $dbh->do(q{DELETE FROM systempreferences WHERE variable="BiblioAddsAuthorities";});
19
        say $out "BiblioAddsAuthorities removed";
20
        say $out "Removed system preference 'BiblioAddsAuthorities'";
20
    },
21
    },
21
};
22
};
(-)a/installer/data/mysql/db_revs/220600051.pl (+1 lines)
Lines 12-17 return { Link Here
12
                ALTER TABLE statistics
12
                ALTER TABLE statistics
13
                    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'
13
                    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'
14
            });
14
            });
15
            say $out "Added column 'statistics.categorycode'";
15
        }
16
        }
16
    },
17
    },
17
};
18
};
(-)a/installer/data/mysql/db_revs/220600053.pl (-3 / +2 lines)
Lines 7-22 return { Link Here
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $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');});
9
        $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');});
10
        say $out "Added new letter 'ILL_REQUEST_UPDATE' (email)";
10
        $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');});
11
        $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');});
12
        say $out "Added new letter 'ILL_REQUEST_UPDATE' (sms)";
11
        $dbh->do(q{INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_update', 0);});
13
        $dbh->do(q{INSERT IGNORE INTO message_attributes (message_name, takes_days) VALUES ('Ill_update', 0);});
12
        my $ready_id = $dbh->last_insert_id(undef, undef, 'message_attributes', undef);
14
        my $ready_id = $dbh->last_insert_id(undef, undef, 'message_attributes', undef);
13
        if (defined $ready_id) {
15
        if (defined $ready_id) {
14
            $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');));
16
            $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');));
15
            $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');));
17
            $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');));
16
            $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');));
18
            $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');));
17
            say $out "Bug 30484 DB update complete";
18
        } else {
19
            say $out "Bug 30484 DB update not completed";
20
        }
19
        }
21
    },
20
    },
22
};
21
};
(-)a/installer/data/mysql/db_revs/220600054.pl (+3 lines)
Lines 8-13 return { Link Here
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
9
10
        $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') });
10
        $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') });
11
        say $out "Added new system preference 'EmailPatronRegistrations'";
11
12
12
        $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',
13
        $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',
13
            '<h3>New OPAC self-registration</h3>
14
            '<h3>New OPAC self-registration</h3>
Lines 25-29 return { Link Here
25
            [% IF borrower.categorycode %]<li>Patron category: [% borrower.categorycode %]</li>[% END %]
26
            [% IF borrower.categorycode %]<li>Patron category: [% borrower.categorycode %]</li>[% END %]
26
            </ul>
27
            </ul>
27
            </p>', 'email', 'default') });
28
            </p>', 'email', 'default') });
29
30
        say $out "Added new letter 'OPAC_REG' (email)";
28
    },
31
    },
29
};
32
};
(-)a/installer/data/mysql/db_revs/220600055.pl (-1 / +1 lines)
Lines 10-15 return { Link Here
10
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
10
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
11
            VALUES ('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo')
11
            VALUES ('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo')
12
        });
12
        });
13
        say $out "Added UseOCLCEncodingLevels system preference";
13
        say $out "Added new system preference 'UseOCLCEncodingLevels'";
14
    },
14
    },
15
};
15
};
(-)a/installer/data/mysql/db_revs/220600057.pl (-3 / +3 lines)
Lines 6-17 return { Link Here
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
9
10
        $dbh->do(q{
10
        $dbh->do(q{
11
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
12
            ('HoldsSplitQueueNumbering', 'actual', 'actual|virtual', 'If the holds queue is split, decide if the actual priorities should be displayed', 'Choice')
12
            ('HoldsSplitQueueNumbering', 'actual', 'actual|virtual', 'If the holds queue is split, decide if the actual priorities should be displayed', 'Choice')
13
        });
13
        });
14
        # Print useful stuff here
14
15
        say $out "Added HoldsSplitQueueNumbering if not already there";
15
        say $out "Added new system preference 'HoldsSplitQueueNumbering'";
16
    },
16
    },
17
};
17
};
(-)a/installer/data/mysql/db_revs/220600059.pl (+4 lines)
Lines 13-22 return { Link Here
13
            "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');
13
            "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');
14
        });
14
        });
15
15
16
        say $out "Added new letter 'PASSWORD_CHANGE' (email)";
17
16
        # Add systempreference
18
        # Add systempreference
17
        $dbh->do(q{
19
        $dbh->do(q{
18
            INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
20
            INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
19
            VALUES ('NotifyPasswordChange','0','','Notify patrons whenever their password is changed.','YesNo')
21
            VALUES ('NotifyPasswordChange','0','','Notify patrons whenever their password is changed.','YesNo')
20
        });
22
        });
23
24
        say $out "Added new system preference 'NotifyPasswordChange'";
21
    },
25
    },
22
};
26
};
(-)a/installer/data/mysql/db_revs/220600060.pl (-4 / +4 lines)
Lines 1-7 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
return {
2
return {
3
    bug_number => "10950",
3
    bug_number => "10950",
4
    description => "Add pronouns to borrowers table",
4
    description => "Add preferred pronoun field to patron record",
5
    up => sub {
5
    up => sub {
6
        my ($args) = @_;
6
        my ($args) = @_;
7
        my ($dbh, $out) = @$args{qw(dbh out)};
7
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 12-18 return { Link Here
12
                COMMENT "patron/borrower's pronouns"
12
                COMMENT "patron/borrower's pronouns"
13
                AFTER initials
13
                AFTER initials
14
            });
14
            });
15
            say $out "Added pronouns column to borrowers table";
15
            say $out "Added column 'borrowers.pronouns'";
16
        }
16
        }
17
        if( !column_exists( 'deletedborrowers', 'pronouns' ) ) {
17
        if( !column_exists( 'deletedborrowers', 'pronouns' ) ) {
18
            $dbh->do(q{
18
            $dbh->do(q{
Lines 21-27 return { Link Here
21
                COMMENT "patron/borrower's pronouns"
21
                COMMENT "patron/borrower's pronouns"
22
                AFTER initials
22
                AFTER initials
23
            });
23
            });
24
            say $out "Added pronouns column to deletedborrowers table";
24
            say $out "Added column 'deletedborrowers.pronouns'";
25
        }
25
        }
26
        if( !column_exists( 'borrower_modifications', 'pronouns' ) ) {
26
        if( !column_exists( 'borrower_modifications', 'pronouns' ) ) {
27
            $dbh->do(q{
27
            $dbh->do(q{
Lines 30-36 return { Link Here
30
                COMMENT "patron/borrower's pronouns"
30
                COMMENT "patron/borrower's pronouns"
31
                AFTER initials
31
                AFTER initials
32
            });
32
            });
33
            say $out "Added pronouns column to borrower_modifications table";
33
            say $out "Added column 'borrower_modifications.pronouns'";
34
        }
34
        }
35
    },
35
    },
36
}
36
}
(-)a/installer/data/mysql/db_revs/220600061.pl (-1 / +2 lines)
Lines 2-12 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "31333",
4
    bug_number => "31333",
5
    description => "Add new suggestionPatronCategoryExceptions system preference",
5
    description => "Add the ability to limit purchase suggestions by patron category",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
9
10
        $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') });
10
        $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') });
11
        say $out "Added new system preference 'suggestionPatronCategoryExceptions'";
11
    },
12
    },
12
};
13
};
(-)a/installer/data/mysql/db_revs/220600064.pl (-2 / +2 lines)
Lines 12-25 return { Link Here
12
            VALUES ('OPACAllowUserToChangeBranch','','Pending, In-Transit, Suspended','Allow users to change the library to pick up a hold for these statuses:','multiple');
12
            VALUES ('OPACAllowUserToChangeBranch','','Pending, In-Transit, Suspended','Allow users to change the library to pick up a hold for these statuses:','multiple');
13
        });
13
        });
14
14
15
        say $out "Added new system preference 'OPACAllowUserToChangeBranch'";
16
15
        $dbh->do(q{
17
        $dbh->do(q{
16
            UPDATE systempreferences
18
            UPDATE systempreferences
17
            SET value=(SELECT CASE WHEN value=1 THEN 'intransit' ELSE '' END FROM systempreferences WHERE variable='OPACInTransitHoldPickupLocationChange')
19
            SET value=(SELECT CASE WHEN value=1 THEN 'intransit' ELSE '' END FROM systempreferences WHERE variable='OPACInTransitHoldPickupLocationChange')
18
            WHERE variable='OPACAllowUserToChangeBranch'
20
            WHERE variable='OPACAllowUserToChangeBranch'
19
        });
21
        });
20
22
21
        say $out "Added new system preference 'OPACAllowUserToChangeBranch'";
22
23
        $dbh->do(q{
23
        $dbh->do(q{
24
            DELETE FROM systempreferences
24
            DELETE FROM systempreferences
25
            WHERE variable = 'OPACInTransitHoldPickupLocationChange'
25
            WHERE variable = 'OPACInTransitHoldPickupLocationChange'
(-)a/installer/data/mysql/db_revs/220600066.pl (-1 / +1 lines)
Lines 13-19 return { Link Here
13
                ADD CONSTRAINT letter_fk FOREIGN KEY (letter_id) REFERENCES letter(id) ON DELETE SET NULL ON UPDATE CASCADE
13
                ADD CONSTRAINT letter_fk FOREIGN KEY (letter_id) REFERENCES letter(id) ON DELETE SET NULL ON UPDATE CASCADE
14
            });
14
            });
15
15
16
            say $out "Added 'letter_id' column to 'message_queue' table";
16
            say $out "Added column 'message_queue.letter_id'";
17
        }
17
        }
18
    },
18
    },
19
};
19
};
(-)a/installer/data/mysql/db_revs/220600067.pl (-6 / +7 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "17170",
4
    bug_number => "17170",
5
    description => "Add permission for creating saved search filters",
5
    description => "Add saved search filters feature",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 10-16 return { Link Here
10
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
10
            INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
11
            (3, 'manage_search_filters', 'Manage custom search filters');
11
            (3, 'manage_search_filters', 'Manage custom search filters');
12
        });
12
        });
13
        say $out "Added manage_search_filters permission";
13
14
        say $out "Added new permission 'manage_search_filters'";
15
14
        unless( TableExists( 'search_filters' ) ){
16
        unless( TableExists( 'search_filters' ) ){
15
            $dbh->do(q{
17
            $dbh->do(q{
16
                CREATE TABLE `search_filters` (
18
                CREATE TABLE `search_filters` (
Lines 23-36 return { Link Here
23
                PRIMARY KEY (`search_filter_id`)
25
                PRIMARY KEY (`search_filter_id`)
24
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
26
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
25
            });
27
            });
26
            say $out "Added search_filters table";
28
            say $out "Added new table 'search_filters'";
27
        } else {
28
            say $out "search_filters table already created";
29
        }
29
        }
30
        $dbh->do(q{
30
        $dbh->do(q{
31
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
31
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
32
            ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo')
32
            ('SavedSearchFilters', '0', NULL, 'Allow staff with permission to create/edit custom search filters', 'YesNo')
33
        });
33
        });
34
        say $out "Added SavedSearchFilters system preference";
34
35
        say $out "Added new system preference 'SavedSearchFilters'";
35
    },
36
    },
36
}
37
}
(-)a/installer/data/mysql/db_revs/220600068.pl (-1 / +3 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "30588",
4
    bug_number => "30588",
5
    description => "Add an 'enforce' option for TwoFactorAuthentication",
5
    description => "Add an 'enforce' option for 'TwoFactorAuthentication' system preference",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 13-17 return { Link Here
13
                type="Choice"
13
                type="Choice"
14
            WHERE variable="TwoFactorAuthentication"
14
            WHERE variable="TwoFactorAuthentication"
15
        });
15
        });
16
17
        say $out "Updated system preference 'TwoFactorAuthentication'";
16
    },
18
    },
17
};
19
};
(-)a/installer/data/mysql/db_revs/220600070.pl (-1 / +1 lines)
Lines 13-18 return { Link Here
13
            WHERE variable = "OpacHiddenItemsExceptions"
13
            WHERE variable = "OpacHiddenItemsExceptions"
14
        });
14
        });
15
        # Print useful stuff here
15
        # Print useful stuff here
16
        say $out "Settings for OpacHiddenItemsExceptions have been updated";
16
        say $out "Updated system preference 'OpacHiddenItemsExceptions'";
17
    },
17
    },
18
};
18
};
(-)a/installer/data/mysql/db_revs/220600073.pl (-1 / +3 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => '30036',
4
    bug_number => '30036',
5
    description => 'Add syspref AuthorityXSLTOpacResultsDisplay',
5
    description => 'Add XSLT for authority results view in OPAC',
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 11-15 return { Link Here
11
            INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`)
11
            INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`)
12
            VALUES ('AuthorityXSLTOpacResultsDisplay','','','Enable XSL stylesheet control over authority results page in the OPAC','Free')
12
            VALUES ('AuthorityXSLTOpacResultsDisplay','','','Enable XSL stylesheet control over authority results page in the OPAC','Free')
13
        });
13
        });
14
15
        say $out "Added new system preference 'AuthorityXSLTOpacResultsDisplay'";
14
    },
16
    },
15
};
17
};
(-)a/installer/data/mysql/db_revs/220600074.pl (-2 / +1 lines)
Lines 6-13 return { Link Here
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
9
10
        $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"});
10
        $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"});
11
        say $out "Update is going well so far";
12
    },
11
    },
13
};
12
};
(-)a/installer/data/mysql/db_revs/220600075.pl (-1 lines)
Lines 8-13 return { Link Here
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
9
10
        $dbh->do(q{ALTER TABLE `tmp_holdsqueue` ADD `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER item_level_request});
10
        $dbh->do(q{ALTER TABLE `tmp_holdsqueue` ADD `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER item_level_request});
11
        say $out "";
12
    },
11
    },
13
};
12
};
(-)a/installer/data/mysql/db_revs/220600076.pl (-3 / +3 lines)
Lines 2-8 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "29792",
4
    bug_number => "29792",
5
    description => "Add AutomaticConfirmTransfer system preference",
5
    description => "Fix transfers created from 'wrong transfer' checkin are not sent if modal dismissed",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
Lines 10-16 return { Link Here
10
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
10
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
            ('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo')
11
            ('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo')
12
        });
12
        });
13
        # Print useful stuff here
13
14
        say $out "AutomaticConfirmTransfer system preference added";
14
        say $out "Added new system preference 'AutomaticConfirmTransfer'";
15
    },
15
    },
16
};
16
};
(-)a/installer/data/mysql/db_revs/220600077.pl (-1 / +2 lines)
Lines 112-117 END_CONTENT Link Here
112
           INSERT IGNORE INTO letter ( module, code, branchcode, name, is_html, title, content, message_transport_type, lang)
112
           INSERT IGNORE INTO letter ( module, code, branchcode, name, is_html, title, content, message_transport_type, lang)
113
           VALUES ( 'members', 'ACCOUNTS_SUMMARY', '', 'Account balance slip', 1, 'Account summary for [% borrower.firstname %] [% borrower.surname %]', "$slip_content", 'print', 'default' )
113
           VALUES ( 'members', 'ACCOUNTS_SUMMARY', '', 'Account balance slip', 1, 'Account summary for [% borrower.firstname %] [% borrower.surname %]', "$slip_content", 'print', 'default' )
114
        });
114
        });
115
        say $out "Notice added";
115
116
        say $out "Added new letter 'ACCOUNTS_SUMMARY' (print)";
116
    },
117
    },
117
};
118
};
(-)a/installer/data/mysql/db_revs/220600079.pl (-1 / +33 lines)
Lines 12-22 return { Link Here
12
            VALUES ('ERMModule', '0', NULL, 'Enable the E-Resource management module', 'YesNo');
12
            VALUES ('ERMModule', '0', NULL, 'Enable the E-Resource management module', 'YesNo');
13
        });
13
        });
14
14
15
        say $out "Added new system preference 'ERMModule'";
16
15
        $dbh->do(q{
17
        $dbh->do(q{
16
            INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton)
18
            INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton)
17
            VALUES (28, 'erm', 'Manage electronic resources', 0)
19
            VALUES (28, 'erm', 'Manage electronic resources', 0)
18
        });
20
        });
19
21
22
        say $out "Added new permission 'erm'";
23
20
        unless ( TableExists('erm_agreements') ) {
24
        unless ( TableExists('erm_agreements') ) {
21
            $dbh->do(q{
25
            $dbh->do(q{
22
                CREATE TABLE `erm_agreements` (
26
                CREATE TABLE `erm_agreements` (
Lines 33-38 return { Link Here
33
                    PRIMARY KEY(`agreement_id`)
37
                    PRIMARY KEY(`agreement_id`)
34
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
38
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
35
            });
39
            });
40
41
            say $out "Added new table 'erm_agreements'";
36
        }
42
        }
37
43
38
        $dbh->do(q{
44
        $dbh->do(q{
Lines 68-73 return { Link Here
68
                    PRIMARY KEY(`agreement_period_id`)
74
                    PRIMARY KEY(`agreement_period_id`)
69
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
75
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
70
            });
76
            });
77
78
            say $out "Added new table 'erm_agreement_periods'";
71
        }
79
        }
72
        unless ( TableExists('erm_licenses') ) {
80
        unless ( TableExists('erm_licenses') ) {
73
            $dbh->do(q{
81
            $dbh->do(q{
Lines 84-89 return { Link Here
84
                    PRIMARY KEY(`license_id`)
92
                    PRIMARY KEY(`license_id`)
85
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
93
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
86
            });
94
            });
95
96
            say $out "Added new table 'erm_licenses'";
87
        }
97
        }
88
        unless ( TableExists('erm_agreement_licenses') ) {
98
        unless ( TableExists('erm_agreement_licenses') ) {
89
            $dbh->do(q{
99
            $dbh->do(q{
Lines 101-106 return { Link Here
101
                    UNIQUE KEY `erm_agreement_licenses_uniq` (`agreement_id`, `license_id`)
111
                    UNIQUE KEY `erm_agreement_licenses_uniq` (`agreement_id`, `license_id`)
102
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
112
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
103
            });
113
            });
114
115
            say $out "Added new table 'erm_agreement_licenses'";
104
        }
116
        }
105
        $dbh->do(q{
117
        $dbh->do(q{
106
            INSERT IGNORE INTO authorised_value_categories (category_name, is_system)
118
            INSERT IGNORE INTO authorised_value_categories (category_name, is_system)
Lines 142-147 return { Link Here
142
                    CONSTRAINT `erm_user_roles_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
154
                    CONSTRAINT `erm_user_roles_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE
143
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
155
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
144
            });
156
            });
157
158
            say $out "Added new table 'erm_user_roles'";
145
        }
159
        }
146
        $dbh->do(q{
160
        $dbh->do(q{
147
            INSERT IGNORE INTO authorised_value_categories (category_name, is_system)
161
            INSERT IGNORE INTO authorised_value_categories (category_name, is_system)
Lines 167-172 return { Link Here
167
                    PRIMARY KEY(`agreement_id`, `related_agreement_id`)
181
                    PRIMARY KEY(`agreement_id`, `related_agreement_id`)
168
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
182
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
169
            });
183
            });
184
185
            say $out "Added new table 'erm_agreement_relationships'";
170
        }
186
        }
171
187
172
        unless ( TableExists('erm_documents') ) {
188
        unless ( TableExists('erm_documents') ) {
Lines 188-193 return { Link Here
188
                    PRIMARY KEY(`document_id`)
204
                    PRIMARY KEY(`document_id`)
189
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
205
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
190
            });
206
            });
207
208
            say $out "Added new table 'erm_documents'";
191
        }
209
        }
192
210
193
        unless ( TableExists('erm_eholdings_packages') ) {
211
        unless ( TableExists('erm_eholdings_packages') ) {
Lines 206-211 return { Link Here
206
                    PRIMARY KEY(`package_id`)
224
                    PRIMARY KEY(`package_id`)
207
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
225
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
208
            });
226
            });
227
228
            say $out "Added new table 'erm_eholdings_packages'";
209
        }
229
        }
210
230
211
        unless ( TableExists('erm_eholdings_packages_agreements') ) {
231
        unless ( TableExists('erm_eholdings_packages_agreements') ) {
Lines 218-223 return { Link Here
218
                    CONSTRAINT `erm_eholdings_packages_agreements_ibfk_2` FOREIGN KEY (`agreement_id`) REFERENCES `erm_agreements` (`agreement_id`) ON DELETE CASCADE ON UPDATE CASCADE
238
                    CONSTRAINT `erm_eholdings_packages_agreements_ibfk_2` FOREIGN KEY (`agreement_id`) REFERENCES `erm_agreements` (`agreement_id`) ON DELETE CASCADE ON UPDATE CASCADE
219
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
239
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
220
            });
240
            });
241
242
            say $out "Added new table 'erm_eholdings_packages_agreements'";
221
        }
243
        }
222
244
223
        unless ( TableExists('erm_eholdings_titles') ) {
245
        unless ( TableExists('erm_eholdings_titles') ) {
Lines 254-259 return { Link Here
254
                    PRIMARY KEY(`title_id`)
276
                    PRIMARY KEY(`title_id`)
255
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
277
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
256
            });
278
            });
279
280
            say $out "Added new table 'erm_eholdings_titles'";
257
        }
281
        }
258
        unless ( TableExists('erm_eholdings_resources') ) {
282
        unless ( TableExists('erm_eholdings_resources') ) {
259
            $dbh->do(q{
283
            $dbh->do(q{
Lines 272-277 return { Link Here
272
                    PRIMARY KEY(`resource_id`)
296
                    PRIMARY KEY(`resource_id`)
273
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
297
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
274
            });
298
            });
299
300
            say $out "Added new table 'erm_eholdings_resources'";
275
        }
301
        }
276
302
277
        unless ( column_exists('aqbooksellers', 'external_id') ) {
303
        unless ( column_exists('aqbooksellers', 'external_id') ) {
Lines 280-285 return { Link Here
280
                ADD COLUMN `external_id` VARCHAR(255) DEFAULT NULL
306
                ADD COLUMN `external_id` VARCHAR(255) DEFAULT NULL
281
                AFTER `deliverytime`
307
                AFTER `deliverytime`
282
            });
308
            });
309
310
            say $out "Added column 'aqbooksellers.external_id'";
283
        }
311
        }
284
312
285
        $dbh->do(q{
313
        $dbh->do(q{
Lines 325-330 return { Link Here
325
            INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
353
            INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
326
            VALUES ('ERMProviders', 'local', 'local|ebsco', 'Set the providers for the ERM module', 'multiple');
354
            VALUES ('ERMProviders', 'local', 'local|ebsco', 'Set the providers for the ERM module', 'multiple');
327
        });
355
        });
356
357
        say $out "Added new system preference 'ERMProviders'";
358
328
        $dbh->do(q{
359
        $dbh->do(q{
329
            INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
360
            INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
330
            VALUES
361
            VALUES
Lines 332-337 return { Link Here
332
            ('ERMProviderEbscoApiKey', '', '', 'API key for EBSCO', 'free');
363
            ('ERMProviderEbscoApiKey', '', '', 'API key for EBSCO', 'free');
333
        });
364
        });
334
365
335
366
        say $out "Added new system preference 'ERMProviderEbscoCustomerID'";
367
        say $out "Added new system preference 'ERMProviderEbscoApiKey'";
336
    }
368
    }
337
};
369
};
(-)a/installer/data/mysql/db_revs/220600081.pl (-1 / +5 lines)
Lines 15-21 return { Link Here
15
            ( 3, 'manage_identity_providers', 'Manage authentication providers')
15
            ( 3, 'manage_identity_providers', 'Manage authentication providers')
16
        });
16
        });
17
17
18
        say $out "manage_identity_providers permission added";
18
        say $out "Added new permission 'manage_identity_providers'";
19
19
20
        unless (TableExists('identity_providers')) {
20
        unless (TableExists('identity_providers')) {
21
            $dbh->do(q{
21
            $dbh->do(q{
Lines 33-38 return { Link Here
33
                KEY `protocol` (`protocol`)
33
                KEY `protocol` (`protocol`)
34
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
34
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
35
            });
35
            });
36
37
            say $out "Added new table 'identity_providers'";
36
        }
38
        }
37
39
38
        unless (TableExists('identity_provider_domains')) {
40
        unless (TableExists('identity_provider_domains')) {
Lines 57-62 return { Link Here
57
                    CONSTRAINT `identity_provider_domain_ibfk_3` FOREIGN KEY (`default_category_id`) REFERENCES `categories` (`categorycode`) ON DELETE CASCADE
59
                    CONSTRAINT `identity_provider_domain_ibfk_3` FOREIGN KEY (`default_category_id`) REFERENCES `categories` (`categorycode`) ON DELETE CASCADE
58
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
60
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
59
            });
61
            });
62
63
            say $out "Added new table 'identity_provider_domains'";
60
        }
64
        }
61
    },
65
    },
62
};
66
};
(-)a/installer/data/mysql/db_revs/220600083.pl (-1 / +4 lines)
Lines 20-29 return { Link Here
20
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
20
                ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
21
            });
21
            });
22
22
23
            say $out "Added new table 'item_editor_templates'";
24
23
            $dbh->do(q{
25
            $dbh->do(q{
24
                INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
26
                INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
25
                ( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others');
27
                ( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others');
26
            });
28
            });
29
30
            say $out "Added new permission 'manage_item_editor_templates'";
27
        }
31
        }
28
    },
32
    },
29
};
33
};
30
- 

Return to bug 32191