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

(-)a/Koha/Schema/Result/AuthorisedValue.pm (-2 / +47 lines)
Lines 50-55 key used to identify the authorized value category Link Here
50
50
51
code use to identify the authorized value
51
code use to identify the authorized value
52
52
53
=head2 parent_authorised_value_id
54
55
  data_type: 'integer'
56
  is_foreign_key: 1
57
  is_nullable: 1
58
59
id of parent authorised value
60
53
=head2 lib
61
=head2 lib
54
62
55
  data_type: 'varchar'
63
  data_type: 'varchar'
Lines 89-94 __PACKAGE__->add_columns( Link Here
89
  },
97
  },
90
  "authorised_value",
98
  "authorised_value",
91
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 80 },
99
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 80 },
100
  "parent_authorised_value_id",
101
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
92
  "lib",
102
  "lib",
93
  { data_type => "varchar", is_nullable => 1, size => 200 },
103
  { data_type => "varchar", is_nullable => 1, size => 200 },
94
  "lib_opac",
104
  "lib_opac",
Lines 127-132 __PACKAGE__->add_unique_constraint("av_uniq", ["category", "authorised_value"]); Link Here
127
137
128
=head1 RELATIONS
138
=head1 RELATIONS
129
139
140
=head2 authorised_values
141
142
Type: has_many
143
144
Related object: L<Koha::Schema::Result::AuthorisedValue>
145
146
=cut
147
148
__PACKAGE__->has_many(
149
  "authorised_values",
150
  "Koha::Schema::Result::AuthorisedValue",
151
  { "foreign.parent_authorised_value_id" => "self.id" },
152
  { cascade_copy => 0, cascade_delete => 0 },
153
);
154
130
=head2 authorised_values_branches
155
=head2 authorised_values_branches
131
156
132
Type: has_many
157
Type: has_many
Lines 172-180 __PACKAGE__->has_many( Link Here
172
  { cascade_copy => 0, cascade_delete => 0 },
197
  { cascade_copy => 0, cascade_delete => 0 },
173
);
198
);
174
199
200
=head2 parent_authorised_value
175
201
176
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
202
Type: belongs_to
177
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LH9dpEEzlVVsjNVv/jnONg
203
204
Related object: L<Koha::Schema::Result::AuthorisedValue>
205
206
=cut
207
208
__PACKAGE__->belongs_to(
209
  "parent_authorised_value",
210
  "Koha::Schema::Result::AuthorisedValue",
211
  { id => "parent_authorised_value_id" },
212
  {
213
    is_deferrable => 1,
214
    join_type     => "LEFT",
215
    on_delete     => "SET NULL",
216
    on_update     => "CASCADE",
217
  },
218
);
219
220
221
# Created by DBIx::Class::Schema::Loader v0.07052 @ 2025-10-30 11:59:08
222
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pF2KR2JI+ugIGxyuSC1e4A
178
223
179
224
180
# You can replace this text with custom code or comments, and it will be preserved on regeneration
225
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/AuthorisedValueCategory.pm (-3 / +48 lines)
Lines 30-35 __PACKAGE__->table("authorised_value_categories"); Link Here
30
  is_nullable: 0
30
  is_nullable: 0
31
  size: 32
31
  size: 32
32
32
33
=head2 parent_category_name
34
35
  data_type: 'varchar'
36
  is_foreign_key: 1
37
  is_nullable: 1
38
  size: 32
39
40
Name (primary key) of parent authorised value category
41
33
=head2 is_system
42
=head2 is_system
34
43
35
  data_type: 'tinyint'
44
  data_type: 'tinyint'
Lines 47-52 __PACKAGE__->table("authorised_value_categories"); Link Here
47
__PACKAGE__->add_columns(
56
__PACKAGE__->add_columns(
48
  "category_name",
57
  "category_name",
49
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 32 },
58
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 32 },
59
  "parent_category_name",
60
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 32 },
50
  "is_system",
61
  "is_system",
51
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
62
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
52
  "is_integer_only",
63
  "is_integer_only",
Lines 67-72 __PACKAGE__->set_primary_key("category_name"); Link Here
67
78
68
=head1 RELATIONS
79
=head1 RELATIONS
69
80
81
=head2 authorised_value_categories
82
83
Type: has_many
84
85
Related object: L<Koha::Schema::Result::AuthorisedValueCategory>
86
87
=cut
88
89
__PACKAGE__->has_many(
90
  "authorised_value_categories",
91
  "Koha::Schema::Result::AuthorisedValueCategory",
92
  { "foreign.parent_category_name" => "self.category_name" },
93
  { cascade_copy => 0, cascade_delete => 0 },
94
);
95
70
=head2 authorised_values
96
=head2 authorised_values
71
97
72
Type: has_many
98
Type: has_many
Lines 112-120 __PACKAGE__->has_many( Link Here
112
  { cascade_copy => 0, cascade_delete => 0 },
138
  { cascade_copy => 0, cascade_delete => 0 },
113
);
139
);
114
140
141
=head2 parent_category_name
115
142
116
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-05-17 07:33:50
143
Type: belongs_to
117
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sDV5yk91mmU5Huaa5QNo6A
144
145
Related object: L<Koha::Schema::Result::AuthorisedValueCategory>
146
147
=cut
148
149
__PACKAGE__->belongs_to(
150
  "parent_category_name",
151
  "Koha::Schema::Result::AuthorisedValueCategory",
152
  { category_name => "parent_category_name" },
153
  {
154
    is_deferrable => 1,
155
    join_type     => "LEFT",
156
    on_delete     => "SET NULL",
157
    on_update     => "CASCADE",
158
  },
159
);
160
161
162
# Created by DBIx::Class::Schema::Loader v0.07052 @ 2025-10-30 11:59:08
163
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Wn2hJ5CmKi9z+LluFC0ewA
118
164
119
__PACKAGE__->add_columns(
165
__PACKAGE__->add_columns(
120
    '+is_system'       => { is_boolean => 1 },
166
    '+is_system'       => { is_boolean => 1 },
121
- 

Return to bug 34198