Koha/installer/data/mysql/db_revs/220600036.pl
Tomas Cohen Arazi 1611fc4c39
Bug 31017: DBRev 22.06.00.036
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-19 16:26:23 -03:00

20 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 type column to aqbooksellers";
}
$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";
},
};