Lines 1-14
Link Here
|
1 |
use Modern::Perl; |
1 |
use Modern::Perl; |
2 |
|
2 |
|
3 |
return { |
3 |
return { |
4 |
bug_number => "34355", |
4 |
bug_number => "34355", |
5 |
description => "Add a table to allow creation of MARC order accounts and a syspref to activate it.", |
5 |
description => "Add a table to allow creation of MARC order accounts and a syspref to activate it.", |
6 |
up => sub { |
6 |
up => sub { |
7 |
my ($args) = @_; |
7 |
my ($args) = @_; |
8 |
my ($dbh, $out) = @$args{qw(dbh out)}; |
8 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
9 |
|
9 |
|
10 |
unless( TableExists('marc_order_accounts') ) { |
10 |
unless ( TableExists('marc_order_accounts') ) { |
11 |
$dbh->do(q{ |
11 |
$dbh->do( |
|
|
12 |
q{ |
12 |
CREATE TABLE `marc_order_accounts` ( |
13 |
CREATE TABLE `marc_order_accounts` ( |
13 |
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique identifier and primary key', |
14 |
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'unique identifier and primary key', |
14 |
`description` varchar(250) NOT NULL COMMENT 'description of this account', |
15 |
`description` varchar(250) NOT NULL COMMENT 'description of this account', |
Lines 22-32
return {
Link Here
|
22 |
`parse_items` tinyint(1) DEFAULT NULL COMMENT 'should items be parsed', |
23 |
`parse_items` tinyint(1) DEFAULT NULL COMMENT 'should items be parsed', |
23 |
`record_type` varchar(50) DEFAULT NULL COMMENT 'type of record in the file', |
24 |
`record_type` varchar(50) DEFAULT NULL COMMENT 'type of record in the file', |
24 |
`encoding` varchar(50) DEFAULT NULL COMMENT 'file encoding', |
25 |
`encoding` varchar(50) DEFAULT NULL COMMENT 'file encoding', |
|
|
26 |
`match_field` varchar(10) DEFAULT NULL COMMENT 'the field that a vendor account has been mapped to in a marc record', |
27 |
`match_value` varchar(50) DEFAULT NULL COMMENT 'the value to be matched against the marc record', |
25 |
PRIMARY KEY (`id`), |
28 |
PRIMARY KEY (`id`), |
26 |
CONSTRAINT `marc_ordering_account_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
29 |
CONSTRAINT `marc_ordering_account_ibfk_1` FOREIGN KEY (`vendor_id`) REFERENCES `aqbooksellers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, |
27 |
CONSTRAINT `marc_ordering_account_ibfk_2` FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE |
30 |
CONSTRAINT `marc_ordering_account_ibfk_2` FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE |
28 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
31 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
29 |
}); |
32 |
} |
|
|
33 |
); |
30 |
|
34 |
|
31 |
say $out "Added new table 'marc_order_accounts'"; |
35 |
say $out "Added new table 'marc_order_accounts'"; |
32 |
} else { |
36 |
} else { |