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

(-)a/Koha/Schema/Result/HoldGroup.pm (+95 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::HoldGroup;
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::HoldGroup
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<hold_group>
19
20
=cut
21
22
__PACKAGE__->table("hold_group");
23
24
=head1 ACCESSORS
25
26
=head2 hold_group_id
27
28
  data_type: 'integer'
29
  extra: {unsigned => 1}
30
  is_auto_increment: 1
31
  is_nullable: 0
32
33
=cut
34
35
__PACKAGE__->add_columns(
36
  "hold_group_id",
37
  {
38
    data_type => "integer",
39
    extra => { unsigned => 1 },
40
    is_auto_increment => 1,
41
    is_nullable => 0,
42
  },
43
);
44
45
=head1 PRIMARY KEY
46
47
=over 4
48
49
=item * L</hold_group_id>
50
51
=back
52
53
=cut
54
55
__PACKAGE__->set_primary_key("hold_group_id");
56
57
=head1 RELATIONS
58
59
=head2 old_reserves
60
61
Type: has_many
62
63
Related object: L<Koha::Schema::Result::OldReserve>
64
65
=cut
66
67
__PACKAGE__->has_many(
68
  "old_reserves",
69
  "Koha::Schema::Result::OldReserve",
70
  { "foreign.hold_group_id" => "self.hold_group_id" },
71
  { cascade_copy => 0, cascade_delete => 0 },
72
);
73
74
=head2 reserves
75
76
Type: has_many
77
78
Related object: L<Koha::Schema::Result::Reserve>
79
80
=cut
81
82
__PACKAGE__->has_many(
83
  "reserves",
84
  "Koha::Schema::Result::Reserve",
85
  { "foreign.hold_group_id" => "self.hold_group_id" },
86
  { cascade_copy => 0, cascade_delete => 0 },
87
);
88
89
90
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2019-04-15 22:28:13
91
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xKP5eBTiypxGQAU7/drVWg
92
93
94
# You can replace this text with custom code or comments, and it will be preserved on regeneration
95
1;
(-)a/Koha/Schema/Result/OldReserve.pm (+34 lines)
Lines 143-148 __PACKAGE__->table("old_reserves"); Link Here
143
  default_value: 0
143
  default_value: 0
144
  is_nullable: 0
144
  is_nullable: 0
145
145
146
=head2 hold_group_id
147
148
  data_type: 'integer'
149
  extra: {unsigned => 1}
150
  is_foreign_key: 1
151
  is_nullable: 1
152
146
=cut
153
=cut
147
154
148
__PACKAGE__->add_columns(
155
__PACKAGE__->add_columns(
Lines 200-205 __PACKAGE__->add_columns( Link Here
200
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
207
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
201
  "item_level_hold",
208
  "item_level_hold",
202
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
209
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
210
  "hold_group_id",
211
  {
212
    data_type => "integer",
213
    extra => { unsigned => 1 },
214
    is_foreign_key => 1,
215
    is_nullable => 1,
216
  },
203
);
217
);
204
218
205
=head1 PRIMARY KEY
219
=head1 PRIMARY KEY
Lines 256-261 __PACKAGE__->belongs_to( Link Here
256
  },
270
  },
257
);
271
);
258
272
273
=head2 hold_group
274
275
Type: belongs_to
276
277
Related object: L<Koha::Schema::Result::HoldGroup>
278
279
=cut
280
281
__PACKAGE__->belongs_to(
282
  "hold_group",
283
  "Koha::Schema::Result::HoldGroup",
284
  { hold_group_id => "hold_group_id" },
285
  {
286
    is_deferrable => 1,
287
    join_type     => "LEFT",
288
    on_delete     => "SET NULL",
289
    on_update     => "CASCADE",
290
  },
291
);
292
259
=head2 itemnumber
293
=head2 itemnumber
260
294
261
Type: belongs_to
295
Type: belongs_to
(-)a/Koha/Schema/Result/Reserve.pm (-1 / +33 lines)
Lines 147-152 __PACKAGE__->table("reserves"); Link Here
147
  default_value: 0
147
  default_value: 0
148
  is_nullable: 0
148
  is_nullable: 0
149
149
150
=head2 hold_group_id
151
152
  data_type: 'integer'
153
  extra: {unsigned => 1}
154
  is_foreign_key: 1
155
  is_nullable: 1
156
150
=cut
157
=cut
151
158
152
__PACKAGE__->add_columns(
159
__PACKAGE__->add_columns(
Lines 214-219 __PACKAGE__->add_columns( Link Here
214
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
221
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
215
  "item_level_hold",
222
  "item_level_hold",
216
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
223
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
224
  "hold_group_id",
225
    data_type => "integer",
226
    extra => { unsigned => 1 },
227
    is_foreign_key => 1,
228
    is_nullable => 1,
229
  },
217
);
230
);
218
231
219
=head1 PRIMARY KEY
232
=head1 PRIMARY KEY
Lines 280-285 __PACKAGE__->belongs_to( Link Here
280
  },
293
  },
281
);
294
);
282
295
296
=head2 hold_group
297
298
Type: belongs_to
299
300
Related object: L<Koha::Schema::Result::HoldGroup>
301
302
=cut
303
304
__PACKAGE__->belongs_to(
305
  "hold_group",
306
  "Koha::Schema::Result::HoldGroup",
307
  { hold_group_id => "hold_group_id" },
308
  {
309
    is_deferrable => 1,
310
    join_type     => "LEFT",
311
    on_delete     => "SET NULL",
312
    on_update     => "CASCADE",
313
  },
314
);
315
283
=head2 itemnumber
316
=head2 itemnumber
284
317
285
Type: belongs_to
318
Type: belongs_to
286
- 

Return to bug 15516