@@ -, +, @@ --- .../data/mysql/atomicupdate/bug_31017.pl | 20 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 21 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug_31017.pl --- a/installer/data/mysql/atomicupdate/bug_31017.pl +++ a/installer/data/mysql/atomicupdate/bug_31017.pl @@ -0,0 +1,20 @@ +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','vendor_type') ){ + $dbh->do(q{ + ALTER TABLE aqbooksellers ADD COLUMN vendor_type varchar(255) DEFAULT NULL AFTER accountnumber + }); + say $out "Added vendor_type column"; + } + $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"; + }, +}; --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -403,6 +403,7 @@ CREATE TABLE `aqbooksellers` ( `address4` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'fourth line of vendor physical address', `phone` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor phone number', `accountnumber` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor account number', + `vendor_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `notes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'order notes', `postal` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor postal address (all lines)', `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor web address', --