diff --git a/installer/data/mysql/atomicupdate/bug_30130.pl b/installer/data/mysql/atomicupdate/bug_30130.pl new file mode 100644 index 0000000000..7dfd3dce17 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30130.pl @@ -0,0 +1,19 @@ +use Modern::Perl; + +return { + bug_number => "30130", + description => "A standard to edi_account", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + unless ( column_exists('vendor_edi_accounts', 'standard') ) { + $dbh->do(q{ + ALTER TABLE vendor_edi_accounts ADD standard varchar(3) DEFAULT 'EUR' AFTER san + }); + + $dbh->do(q{ + UPDATE vendor_edi_accounts SET standard = 'BIC' WHERE san IN ( '5013546025065', '9377779308820' ) + }); + } + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 5a7616c8d9..a7b71dfcf1 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -5263,6 +5263,7 @@ CREATE TABLE `vendor_edi_accounts` ( `download_directory` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `upload_directory` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL, `san` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL, + `standard` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT 'EUR', `id_code_qualifier` varchar(3) COLLATE utf8mb4_unicode_ci DEFAULT '14', `transport` varchar(6) COLLATE utf8mb4_unicode_ci DEFAULT 'FTP', `quotes_enabled` tinyint(1) NOT NULL DEFAULT 0,