View | Details | Raw Unified | Return to bug 31017
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_31017.pl (+20 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "31017",
5
    description => "Add type option to vendors",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        unless( column_exists('aqbooksellers','vendor_type') ){
10
            $dbh->do(q{
11
                ALTER TABLE aqbooksellers ADD COLUMN vendor_type varchar(255) DEFAULT NULL AFTER accountnumber
12
            });
13
            say $out "Added vendor_type column";
14
        }
15
        $dbh->do(q{
16
            INSERT IGNORE INTO authorised_value_categories( category_name, is_system ) VALUES ('VENDOR_TYPE', 1);
17
        });
18
        say $out "Added VENDOR_TYPE authorised value category";
19
    },
20
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 404-409 CREATE TABLE `aqbooksellers` ( Link Here
404
  `address4` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'fourth line of vendor physical address',
404
  `address4` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'fourth line of vendor physical address',
405
  `phone` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor phone number',
405
  `phone` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor phone number',
406
  `accountnumber` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor account number',
406
  `accountnumber` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor account number',
407
  `vendor_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
407
  `notes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'order notes',
408
  `notes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'order notes',
408
  `postal` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor postal address (all lines)',
409
  `postal` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor postal address (all lines)',
409
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor web address',
410
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'vendor web address',
410
- 

Return to bug 31017