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

(-)a/Koha/Schema/Result/Matchcheck.pm (+8 lines)
Lines 47-52 __PACKAGE__->table("matchchecks"); Link Here
47
  is_foreign_key: 1
47
  is_foreign_key: 1
48
  is_nullable: 0
48
  is_nullable: 0
49
49
50
=head2 operator
51
52
  data_type: 'varchar'
53
  is_nullable: 1
54
  size: 32
55
50
=cut
56
=cut
51
57
52
__PACKAGE__->add_columns(
58
__PACKAGE__->add_columns(
Lines 58-63 __PACKAGE__->add_columns( Link Here
58
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
64
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
59
  "target_matchpoint_id",
65
  "target_matchpoint_id",
60
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
66
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
67
  "operator",
68
  { data_type => "varchar", is_nullable => 1, size => 32 },
61
);
69
);
62
70
63
=head1 PRIMARY KEY
71
=head1 PRIMARY KEY
(-)a/Koha/Schema/Result/MatchpointComponent.pm (+7 lines)
Lines 42-47 __PACKAGE__->table("matchpoint_components"); Link Here
42
  default_value: 0
42
  default_value: 0
43
  is_nullable: 0
43
  is_nullable: 0
44
44
45
=head2 constant
46
47
  data_type: 'mediumtext'
48
  is_nullable: 1
49
45
=head2 tag
50
=head2 tag
46
51
47
  data_type: 'varchar'
52
  data_type: 'varchar'
Lines 82-87 __PACKAGE__->add_columns( Link Here
82
    default_value => 0,
87
    default_value => 0,
83
    is_nullable   => 0,
88
    is_nullable   => 0,
84
  },
89
  },
90
  "constant",
91
  { data_type => "mediumtext", is_nullable => 1 },
85
  "tag",
92
  "tag",
86
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 3 },
93
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 3 },
87
  "subfields",
94
  "subfields",
(-)a/installer/data/mysql/atomicupdate/bug_15536-matchcheck-operator-and-constant-values.pl (+20 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "15536",
5
    description => "Additional match check comparison.",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        say $out "Add column operator.";
11
        $dbh->do(
12
            q{ALTER TABLE matchchecks ADD COLUMN IF NOT EXISTS `operator` varchar(32) NOT NULL DEFAULT 'eq' AFTER `target_matchpoint_id`}
13
        );
14
15
        say $out "Add column constant.";
16
        $dbh->do(
17
            q{ALTER TABLE matchpoint_components ADD COLUMN IF NOT EXISTS `constant` mediumtext DEFAULT NULL AFTER `sequence`}
18
        );
19
    },
20
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +2 lines)
Lines 4560-4565 CREATE TABLE `matchchecks` ( Link Here
4560
  `matchcheck_id` int(11) NOT NULL AUTO_INCREMENT,
4560
  `matchcheck_id` int(11) NOT NULL AUTO_INCREMENT,
4561
  `source_matchpoint_id` int(11) NOT NULL,
4561
  `source_matchpoint_id` int(11) NOT NULL,
4562
  `target_matchpoint_id` int(11) NOT NULL,
4562
  `target_matchpoint_id` int(11) NOT NULL,
4563
  `operator` varchar(32) NOT NULL DEFAULT 'eq',
4563
  PRIMARY KEY (`matchcheck_id`),
4564
  PRIMARY KEY (`matchcheck_id`),
4564
  KEY `matcher_matchchecks_ifbk_1` (`matcher_id`),
4565
  KEY `matcher_matchchecks_ifbk_1` (`matcher_id`),
4565
  KEY `matcher_matchchecks_ifbk_2` (`source_matchpoint_id`),
4566
  KEY `matcher_matchchecks_ifbk_2` (`source_matchpoint_id`),
Lines 4613-4618 DROP TABLE IF EXISTS `matchpoint_components`; Link Here
4613
CREATE TABLE `matchpoint_components` (
4614
CREATE TABLE `matchpoint_components` (
4614
  `matchpoint_id` int(11) NOT NULL,
4615
  `matchpoint_id` int(11) NOT NULL,
4615
  `matchpoint_component_id` int(11) NOT NULL AUTO_INCREMENT,
4616
  `matchpoint_component_id` int(11) NOT NULL AUTO_INCREMENT,
4617
  `constant` mediumtext DEFAULT NULL,
4616
  `sequence` int(11) NOT NULL DEFAULT 0,
4618
  `sequence` int(11) NOT NULL DEFAULT 0,
4617
  `tag` varchar(3) NOT NULL DEFAULT '',
4619
  `tag` varchar(3) NOT NULL DEFAULT '',
4618
  `subfields` varchar(40) NOT NULL DEFAULT '',
4620
  `subfields` varchar(40) NOT NULL DEFAULT '',
4619
- 

Return to bug 15536