Koha/installer/data/mysql/db_revs/220600036.pl
Tomas Cohen Arazi 7a413f8015
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>
2022-11-14 15:08:10 -03:00

21 lines
682 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "31017",
description => "Add type option to vendors",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
unless( column_exists('aqbooksellers','type') ){
$dbh->do(q{
ALTER TABLE aqbooksellers ADD COLUMN type varchar(255) DEFAULT NULL AFTER accountnumber
});
say $out "Added column 'aqbooksellers.type'";
}
$dbh->do(q{
INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('VENDOR_TYPE', 1);
});
say $out "Added VENDOR_TYPE authorised value category";
},
};