Bug 32057: DBRev 22.12.00.013
[koha.git] / installer / data / mysql / db_revs / 221200007.pl
1 use Modern::Perl;
2
3 return {
4     bug_number => "32967",
5     description => "Recalls notices are using the wrong database columns",
6     up => sub {
7         my ($args) = @_;
8         my ($dbh, $out) = @$args{qw(dbh out)};
9
10         $dbh->do(q{ UPDATE letter SET content=REPLACE(content,'recalls.branchcode','recalls.pickup_library_id') WHERE code='PICKUP_RECALLED_ITEM' });
11         $dbh->do(q{ UPDATE letter SET content=REPLACE(content,'recalls.expirationdate','recalls.expiration_date') WHERE code='PICKUP_RECALLED_ITEM' });
12
13         say $out "Fix column names in PICKUP_RECALLED_ITEM notice";
14
15         $dbh->do(q{ UPDATE letter SET content=REPLACE(content,'recalls.waitingdate','recalls.waiting_date') WHERE code='RECALL_REQUESTER_DET' });
16         $dbh->do(q{ UPDATE letter SET content=REPLACE(content,'recalls.recallnotes','recalls.notes') WHERE code='RECALL_REQUESTER_DET' });
17
18         say $out "Fix column names in RECALL_REQUESTER_DET notice";
19     },
20 };