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

(-)a/Koha/Schema/Result/SearchField.pm (-14 / +6 lines)
Lines 40-48 the name of the field as it will be stored in the search engine Link Here
40
=head2 label
40
=head2 label
41
41
42
  data_type: 'varchar'
42
  data_type: 'varchar'
43
  is_nullable: 1
43
  is_nullable: 0
44
  size: 255
44
  size: 255
45
45
46
the human readable name of the field, for display
47
46
=head2 type
48
=head2 type
47
49
48
  data_type: 'enum'
50
  data_type: 'enum'
Lines 59-65 __PACKAGE__->add_columns( Link Here
59
  "name",
61
  "name",
60
  { data_type => "varchar", is_nullable => 0, size => 255 },
62
  { data_type => "varchar", is_nullable => 0, size => 255 },
61
  "label",
63
  "label",
62
  { data_type => "varchar", is_nullable => 1, size => 255 },
64
  { data_type => "varchar", is_nullable => 0, size => 255 },
63
  "type",
65
  "type",
64
  {
66
  {
65
    data_type => "enum",
67
    data_type => "enum",
Lines 111-129 __PACKAGE__->has_many( Link Here
111
  { cascade_copy => 0, cascade_delete => 0 },
113
  { cascade_copy => 0, cascade_delete => 0 },
112
);
114
);
113
115
114
=head2 search_marc_maps
115
116
Type: many_to_many
117
118
Composing rels: L</search_marc_to_fields> -> search_marc_map
119
120
=cut
121
122
__PACKAGE__->many_to_many("search_marc_maps", "search_marc_to_fields", "search_marc_map");
123
124
116
125
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-09-25 15:21:43
117
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-12 16:41:47
126
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HD0m5hWYi/GXgz1rvk+Ipw
118
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4MJO9216VF37w7PlWCcBKg
127
119
128
120
129
# You can replace this text with custom code or comments, and it will be preserved on regeneration
121
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/SearchMarcMap.pm (-41 / +20 lines)
Lines 53-81 what MARC type this map is for Link Here
53
53
54
the MARC specifier for this field
54
the MARC specifier for this field
55
55
56
=head2 facet
57
58
  data_type: 'tinyint'
59
  default_value: 0
60
  is_nullable: 1
61
62
true if a facet field should be generated for this
63
64
=head2 suggestible
65
66
  data_type: 'tinyint'
67
  default_value: 0
68
  is_nullable: 1
69
70
true if this field can be used to generate suggestions for browse
71
72
=head2 sort
73
74
  data_type: 'tinyint'
75
  is_nullable: 1
76
77
true/false creates special sort handling, null doesn't
78
79
=cut
56
=cut
80
57
81
__PACKAGE__->add_columns(
58
__PACKAGE__->add_columns(
Lines 95-106 __PACKAGE__->add_columns( Link Here
95
  },
72
  },
96
  "marc_field",
73
  "marc_field",
97
  { data_type => "varchar", is_nullable => 0, size => 255 },
74
  { data_type => "varchar", is_nullable => 0, size => 255 },
98
  "facet",
99
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
100
  "suggestible",
101
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
102
  "sort",
103
  { data_type => "tinyint", is_nullable => 1 },
104
);
75
);
105
76
106
=head1 PRIMARY KEY
77
=head1 PRIMARY KEY
Lines 115-120 __PACKAGE__->add_columns( Link Here
115
86
116
__PACKAGE__->set_primary_key("id");
87
__PACKAGE__->set_primary_key("id");
117
88
89
=head1 UNIQUE CONSTRAINTS
90
91
=head2 C<index_name>
92
93
=over 4
94
95
=item * L</index_name>
96
97
=item * L</marc_field>
98
99
=item * L</marc_type>
100
101
=back
102
103
=cut
104
105
__PACKAGE__->add_unique_constraint("index_name", ["index_name", "marc_field", "marc_type"]);
106
118
=head1 RELATIONS
107
=head1 RELATIONS
119
108
120
=head2 search_marc_to_fields
109
=head2 search_marc_to_fields
Lines 132-150 __PACKAGE__->has_many( Link Here
132
  { cascade_copy => 0, cascade_delete => 0 },
121
  { cascade_copy => 0, cascade_delete => 0 },
133
);
122
);
134
123
135
=head2 search_fields
136
137
Type: many_to_many
138
139
Composing rels: L</search_marc_to_fields> -> search_field
140
141
=cut
142
143
__PACKAGE__->many_to_many("search_fields", "search_marc_to_fields", "search_field");
144
145
124
146
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-09-25 15:20:52
125
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-12 16:41:47
147
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o579otqUGA8XhO+NYv99dw
126
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nKMOxnAJST3zNN6Kxj2ynA
148
127
149
128
150
# You can replace this text with custom code or comments, and it will be preserved on regeneration
129
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/SearchMarcToField.pm (-4 / +32 lines)
Lines 35-40 __PACKAGE__->table("search_marc_to_field"); Link Here
35
  is_foreign_key: 1
35
  is_foreign_key: 1
36
  is_nullable: 0
36
  is_nullable: 0
37
37
38
=head2 facet
39
40
  data_type: 'tinyint'
41
  default_value: 0
42
  is_nullable: 1
43
44
true if a facet field should be generated for this
45
46
=head2 suggestible
47
48
  data_type: 'tinyint'
49
  default_value: 0
50
  is_nullable: 1
51
52
true if this field can be used to generate suggestions for browse
53
54
=head2 sort
55
56
  data_type: 'tinyint'
57
  is_nullable: 1
58
59
true/false creates special sort handling, null doesn't
60
38
=cut
61
=cut
39
62
40
__PACKAGE__->add_columns(
63
__PACKAGE__->add_columns(
Lines 42-47 __PACKAGE__->add_columns( Link Here
42
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
65
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
43
  "search_field_id",
66
  "search_field_id",
44
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
67
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
68
  "facet",
69
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
70
  "suggestible",
71
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
72
  "sort",
73
  { data_type => "tinyint", is_nullable => 1 },
45
);
74
);
46
75
47
=head1 PRIMARY KEY
76
=head1 PRIMARY KEY
Lines 72-78 __PACKAGE__->belongs_to( Link Here
72
  "search_field",
101
  "search_field",
73
  "Koha::Schema::Result::SearchField",
102
  "Koha::Schema::Result::SearchField",
74
  { id => "search_field_id" },
103
  { id => "search_field_id" },
75
  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
104
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
76
);
105
);
77
106
78
=head2 search_marc_map
107
=head2 search_marc_map
Lines 91-98 __PACKAGE__->belongs_to( Link Here
91
);
120
);
92
121
93
122
94
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-09-25 15:19:43
123
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-10-12 16:41:47
95
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:h9oY2xOGibcnsriEfcFe8A
124
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ccnCYwDdtPGZ/VArAe1kPA
96
125
97
126
98
# You can replace this text with custom code or comments, and it will be preserved on regeneration
127
# You can replace this text with custom code or comments, and it will be preserved on regeneration
99
- 

Return to bug 12478