Koha/installer/data/mysql/db_revs/220600060.pl
Tomas Cohen Arazi 42f203c4fc
Bug 10950: DBRev 22.06.00.060
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-03 15:05:01 -03:00

36 lines
1.3 KiB
Perl
Executable file

use Modern::Perl;
return {
bug_number => "10950",
description => "Add pronouns to borrowers table",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
if( !column_exists( 'borrowers', 'pronouns' ) ) {
$dbh->do(q{
ALTER TABLE borrowers
ADD COLUMN pronouns longtext NULL DEFAULT NULL
COMMENT "patron/borrower's pronouns"
AFTER initials
});
say $out "Added pronouns column to borrowers table";
}
if( !column_exists( 'deletedborrowers', 'pronouns' ) ) {
$dbh->do(q{
ALTER TABLE deletedborrowers
ADD COLUMN pronouns longtext NULL DEFAULT NULL
COMMENT "patron/borrower's pronouns"
AFTER initials
});
say $out "Added pronouns column to deletedborrowers table";
}
if( !column_exists( 'borrower_modifications', 'pronouns' ) ) {
$dbh->do(q{
ALTER TABLE borrower_modifications
ADD COLUMN pronouns longtext NULL DEFAULT NULL
COMMENT "patron/borrower's pronouns"
AFTER initials
});
say $out "Added pronouns column to borrower_modifications table";
}
},
}