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

(-)a/Koha/Schema/Result/BorrowerAttributeType.pm (-31 / +29 lines)
Lines 95-109 foreign key from authorised_values that links this custom field to an authorized Link Here
95
95
96
defines if this field displays in checkout screens
96
defines if this field displays in checkout screens
97
97
98
=head2 category_code
99
100
  data_type: 'varchar'
101
  is_foreign_key: 1
102
  is_nullable: 1
103
  size: 10
104
105
defines a category for an attribute_type
106
107
=head2 class
98
=head2 class
108
99
109
  data_type: 'varchar'
100
  data_type: 'varchar'
Lines 150-157 __PACKAGE__->add_columns( Link Here
150
  { data_type => "varchar", is_nullable => 1, size => 32 },
141
  { data_type => "varchar", is_nullable => 1, size => 32 },
151
  "display_checkout",
142
  "display_checkout",
152
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
143
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
153
  "category_code",
154
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
155
  "class",
144
  "class",
156
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
145
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 },
157
  "keep_for_pseudonymization",
146
  "keep_for_pseudonymization",
Lines 189-227 __PACKAGE__->has_many( Link Here
189
  { cascade_copy => 0, cascade_delete => 0 },
178
  { cascade_copy => 0, cascade_delete => 0 },
190
);
179
);
191
180
192
=head2 borrower_attributes
181
=head2 borrower_attribute_types_categories
193
182
194
Type: has_many
183
Type: has_many
195
184
196
Related object: L<Koha::Schema::Result::BorrowerAttribute>
185
Related object: L<Koha::Schema::Result::BorrowerAttributeTypesCategory>
197
186
198
=cut
187
=cut
199
188
200
__PACKAGE__->has_many(
189
__PACKAGE__->has_many(
201
  "borrower_attributes",
190
  "borrower_attribute_types_categories",
202
  "Koha::Schema::Result::BorrowerAttribute",
191
  "Koha::Schema::Result::BorrowerAttributeTypesCategory",
203
  { "foreign.code" => "self.code" },
192
  { "foreign.borrower_attribute_type_code" => "self.code" },
204
  { cascade_copy => 0, cascade_delete => 0 },
193
  { cascade_copy => 0, cascade_delete => 0 },
205
);
194
);
206
195
207
=head2 category_code
196
=head2 borrower_attributes
208
197
209
Type: belongs_to
198
Type: has_many
210
199
211
Related object: L<Koha::Schema::Result::Category>
200
Related object: L<Koha::Schema::Result::BorrowerAttribute>
212
201
213
=cut
202
=cut
214
203
215
__PACKAGE__->belongs_to(
204
__PACKAGE__->has_many(
216
  "category_code",
205
  "borrower_attributes",
217
  "Koha::Schema::Result::Category",
206
  "Koha::Schema::Result::BorrowerAttribute",
218
  { categorycode => "category_code" },
207
  { "foreign.code" => "self.code" },
219
  {
208
  { cascade_copy => 0, cascade_delete => 0 },
220
    is_deferrable => 1,
221
    join_type     => "LEFT",
222
    on_delete     => "RESTRICT",
223
    on_update     => "RESTRICT",
224
  },
225
);
209
);
226
210
227
=head2 pseudonymized_borrower_attributes
211
=head2 pseudonymized_borrower_attributes
Lines 239-247 __PACKAGE__->has_many( Link Here
239
  { cascade_copy => 0, cascade_delete => 0 },
223
  { cascade_copy => 0, cascade_delete => 0 },
240
);
224
);
241
225
226
=head2 categorycodes
227
228
Type: many_to_many
229
230
Composing rels: L</borrower_attribute_types_categories> -> categorycode
231
232
=cut
233
234
__PACKAGE__->many_to_many(
235
  "categorycodes",
236
  "borrower_attribute_types_categories",
237
  "categorycode",
238
);
239
242
240
243
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-04-25 12:50:55
241
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2022-11-03 13:31:18
244
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VgJP4Ugfz0sN3YoJk/tshA
242
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Y08Zohgrnb412pc62ncRfg
245
243
246
__PACKAGE__->add_columns(
244
__PACKAGE__->add_columns(
247
    '+keep_for_pseudonymization' => { is_boolean => 1 },
245
    '+keep_for_pseudonymization' => { is_boolean => 1 },
(-)a/Koha/Schema/Result/BorrowerAttributeTypesCategory.pm (+101 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::BorrowerAttributeTypesCategory;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::BorrowerAttributeTypesCategory
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<borrower_attribute_types_categories>
19
20
=cut
21
22
__PACKAGE__->table("borrower_attribute_types_categories");
23
24
=head1 ACCESSORS
25
26
=head2 borrower_attribute_type_code
27
28
  data_type: 'varchar'
29
  is_foreign_key: 1
30
  is_nullable: 0
31
  size: 10
32
33
=head2 categorycode
34
35
  data_type: 'varchar'
36
  is_foreign_key: 1
37
  is_nullable: 0
38
  size: 10
39
40
=cut
41
42
__PACKAGE__->add_columns(
43
  "borrower_attribute_type_code",
44
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
45
  "categorycode",
46
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
47
);
48
49
=head1 PRIMARY KEY
50
51
=over 4
52
53
=item * L</borrower_attribute_type_code>
54
55
=item * L</categorycode>
56
57
=back
58
59
=cut
60
61
__PACKAGE__->set_primary_key("borrower_attribute_type_code", "categorycode");
62
63
=head1 RELATIONS
64
65
=head2 borrower_attribute_type_code
66
67
Type: belongs_to
68
69
Related object: L<Koha::Schema::Result::BorrowerAttributeType>
70
71
=cut
72
73
__PACKAGE__->belongs_to(
74
  "borrower_attribute_type_code",
75
  "Koha::Schema::Result::BorrowerAttributeType",
76
  { code => "borrower_attribute_type_code" },
77
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
78
);
79
80
=head2 categorycode
81
82
Type: belongs_to
83
84
Related object: L<Koha::Schema::Result::Category>
85
86
=cut
87
88
__PACKAGE__->belongs_to(
89
  "categorycode",
90
  "Koha::Schema::Result::Category",
91
  { categorycode => "categorycode" },
92
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
93
);
94
95
96
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2022-11-03 13:31:18
97
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qDLi69AE+gI/P6b6aeQXcw
98
99
100
# You can replace this text with custom code or comments, and it will be preserved on regeneration
101
1;
(-)a/Koha/Schema/Result/Category.pm (-7 / +21 lines)
Lines 287-304 __PACKAGE__->set_primary_key("categorycode"); Link Here
287
287
288
=head1 RELATIONS
288
=head1 RELATIONS
289
289
290
=head2 borrower_attribute_types
290
=head2 borrower_attribute_types_categories
291
291
292
Type: has_many
292
Type: has_many
293
293
294
Related object: L<Koha::Schema::Result::BorrowerAttributeType>
294
Related object: L<Koha::Schema::Result::BorrowerAttributeTypesCategory>
295
295
296
=cut
296
=cut
297
297
298
__PACKAGE__->has_many(
298
__PACKAGE__->has_many(
299
  "borrower_attribute_types",
299
  "borrower_attribute_types_categories",
300
  "Koha::Schema::Result::BorrowerAttributeType",
300
  "Koha::Schema::Result::BorrowerAttributeTypesCategory",
301
  { "foreign.category_code" => "self.categorycode" },
301
  { "foreign.categorycode" => "self.categorycode" },
302
  { cascade_copy => 0, cascade_delete => 0 },
302
  { cascade_copy => 0, cascade_delete => 0 },
303
);
303
);
304
304
Lines 362-370 __PACKAGE__->has_many( Link Here
362
  { cascade_copy => 0, cascade_delete => 0 },
362
  { cascade_copy => 0, cascade_delete => 0 },
363
);
363
);
364
364
365
=head2 borrower_attribute_type_codes
366
367
Type: many_to_many
368
369
Composing rels: L</borrower_attribute_types_categories> -> borrower_attribute_type_code
370
371
=cut
372
373
__PACKAGE__->many_to_many(
374
  "borrower_attribute_type_codes",
375
  "borrower_attribute_types_categories",
376
  "borrower_attribute_type_code",
377
);
378
365
379
366
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-06-23 16:29:27
380
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2022-11-03 13:31:18
367
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SKWF2QpqQtXoujwurKFQhA
381
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KsnusPPFV49wWCxBNX5vtQ
368
382
369
sub koha_object_class {
383
sub koha_object_class {
370
    'Koha::Patron::Category';
384
    'Koha::Patron::Category';
(-)a/Koha/Schema/Result/TmpHoldsqueue.pm (-3 / +18 lines)
Lines 108-113 __PACKAGE__->table("tmp_holdsqueue"); Link Here
108
  default_value: 0
108
  default_value: 0
109
  is_nullable: 0
109
  is_nullable: 0
110
110
111
=head2 timestamp
112
113
  data_type: 'timestamp'
114
  datetime_undef_if_invalid: 1
115
  default_value: current_timestamp
116
  is_nullable: 0
117
118
date and time this entry as added/last updated
119
111
=cut
120
=cut
112
121
113
__PACKAGE__->add_columns(
122
__PACKAGE__->add_columns(
Lines 141-146 __PACKAGE__->add_columns( Link Here
141
  { data_type => "mediumtext", is_nullable => 1 },
150
  { data_type => "mediumtext", is_nullable => 1 },
142
  "item_level_request",
151
  "item_level_request",
143
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
152
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
153
  "timestamp",
154
  {
155
    data_type => "timestamp",
156
    datetime_undef_if_invalid => 1,
157
    default_value => \"current_timestamp",
158
    is_nullable => 0,
159
  },
144
);
160
);
145
161
146
=head1 RELATIONS
162
=head1 RELATIONS
Lines 201-208 __PACKAGE__->belongs_to( Link Here
201
);
217
);
202
218
203
219
204
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-20 12:00:15
220
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2022-11-03 13:28:56
205
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ytvFiixR/AIAgTV/5sewcQ
221
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1/MqWc4gU6Oirlw+PuJFNw
206
222
207
223
208
# You can replace this text with custom content, and it will be preserved on regeneration
224
# You can replace this text with custom content, and it will be preserved on regeneration
209
- 

Return to bug 26573