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

(-)a/Koha/Schema/Result/Biblio.pm (-4 / +21 lines)
Lines 75-81 __PACKAGE__->table("biblio"); Link Here
75
75
76
  data_type: 'timestamp'
76
  data_type: 'timestamp'
77
  datetime_undef_if_invalid: 1
77
  datetime_undef_if_invalid: 1
78
  default_value: current_timestamp
78
  default_value: 'current_timestamp()'
79
  is_nullable: 0
79
  is_nullable: 0
80
80
81
=head2 datecreated
81
=head2 datecreated
Lines 114-120 __PACKAGE__->add_columns( Link Here
114
  {
114
  {
115
    data_type => "timestamp",
115
    data_type => "timestamp",
116
    datetime_undef_if_invalid => 1,
116
    datetime_undef_if_invalid => 1,
117
    default_value => \"current_timestamp",
117
    default_value => "current_timestamp()",
118
    is_nullable => 0,
118
    is_nullable => 0,
119
  },
119
  },
120
  "datecreated",
120
  "datecreated",
Lines 227-232 __PACKAGE__->has_many( Link Here
227
  { cascade_copy => 0, cascade_delete => 0 },
227
  { cascade_copy => 0, cascade_delete => 0 },
228
);
228
);
229
229
230
=head2 holdings
231
232
Type: has_many
233
234
Related object: L<Koha::Schema::Result::Holding>
235
236
=cut
237
238
__PACKAGE__->has_many(
239
  "holdings",
240
  "Koha::Schema::Result::Holding",
241
  { "foreign.biblionumber" => "self.biblionumber" },
242
  { cascade_copy => 0, cascade_delete => 0 },
243
);
244
230
=head2 items
245
=head2 items
231
246
232
Type: has_many
247
Type: has_many
Lines 363-369 __PACKAGE__->has_many( Link Here
363
);
378
);
364
379
365
380
366
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-11 12:56:41
381
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-04-02 12:20:18
367
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ebn7Szfm8/HbrdAc7ekTnA
382
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sEYb+MJ3x/UIPu0teELg7g
383
368
384
385
# You can replace this text with custom code or comments, and it will be preserved on regeneration
369
1;
386
1;
(-)a/Koha/Schema/Result/Branch.pm (-9 / +18 lines)
Lines 526-531 __PACKAGE__->has_many( Link Here
526
  { cascade_copy => 0, cascade_delete => 0 },
526
  { cascade_copy => 0, cascade_delete => 0 },
527
);
527
);
528
528
529
=head2 holdings
530
531
Type: has_many
532
533
Related object: L<Koha::Schema::Result::Holding>
534
535
=cut
536
537
__PACKAGE__->has_many(
538
  "holdings",
539
  "Koha::Schema::Result::Holding",
540
  { "foreign.holdingbranch" => "self.branchcode" },
541
  { cascade_copy => 0, cascade_delete => 0 },
542
);
543
529
=head2 illrequests
544
=head2 illrequests
530
545
531
Type: has_many
546
Type: has_many
Lines 677-691 __PACKAGE__->has_many( Link Here
677
);
692
);
678
693
679
694
680
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-11 12:56:41
695
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-04-02 12:20:18
681
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pKohWwsuUHcZSlGDj7zmcw
696
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3ZyvuYcxoY0YA3VZA8X9/A
682
683
__PACKAGE__->add_columns(
684
    '+pickup_location' => { is_boolean => 1 }
685
);
686
697
687
sub koha_objects_class {
688
    'Koha::Libraries';
689
}
690
698
699
# You can replace this text with custom code or comments, and it will be preserved on regeneration
691
1;
700
1;
(-)a/Koha/Schema/Result/Holding.pm (+221 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::Holding;
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::Holding
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<holdings>
19
20
=cut
21
22
__PACKAGE__->table("holdings");
23
24
=head1 ACCESSORS
25
26
=head2 holding_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 biblionumber
33
34
  data_type: 'integer'
35
  default_value: 0
36
  is_foreign_key: 1
37
  is_nullable: 0
38
39
=head2 frameworkcode
40
41
  data_type: 'varchar'
42
  default_value: (empty string)
43
  is_nullable: 0
44
  size: 4
45
46
=head2 holdingbranch
47
48
  data_type: 'varchar'
49
  is_foreign_key: 1
50
  is_nullable: 1
51
  size: 10
52
53
=head2 location
54
55
  data_type: 'varchar'
56
  is_nullable: 1
57
  size: 80
58
59
=head2 ccode
60
61
  data_type: 'varchar'
62
  is_nullable: 1
63
  size: 80
64
65
=head2 callnumber
66
67
  data_type: 'varchar'
68
  is_nullable: 1
69
  size: 255
70
71
=head2 suppress
72
73
  data_type: 'tinyint'
74
  is_nullable: 1
75
76
=head2 timestamp
77
78
  data_type: 'timestamp'
79
  datetime_undef_if_invalid: 1
80
  default_value: 'current_timestamp()'
81
  is_nullable: 0
82
83
=head2 datecreated
84
85
  data_type: 'date'
86
  datetime_undef_if_invalid: 1
87
  is_nullable: 0
88
89
=head2 deleted_on
90
91
  data_type: 'datetime'
92
  datetime_undef_if_invalid: 1
93
  is_nullable: 1
94
95
=cut
96
97
__PACKAGE__->add_columns(
98
  "holding_id",
99
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
100
  "biblionumber",
101
  {
102
    data_type      => "integer",
103
    default_value  => 0,
104
    is_foreign_key => 1,
105
    is_nullable    => 0,
106
  },
107
  "frameworkcode",
108
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 },
109
  "holdingbranch",
110
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
111
  "location",
112
  { data_type => "varchar", is_nullable => 1, size => 80 },
113
  "ccode",
114
  { data_type => "varchar", is_nullable => 1, size => 80 },
115
  "callnumber",
116
  { data_type => "varchar", is_nullable => 1, size => 255 },
117
  "suppress",
118
  { data_type => "tinyint", is_nullable => 1 },
119
  "timestamp",
120
  {
121
    data_type => "timestamp",
122
    datetime_undef_if_invalid => 1,
123
    default_value => "current_timestamp()",
124
    is_nullable => 0,
125
  },
126
  "datecreated",
127
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 },
128
  "deleted_on",
129
  {
130
    data_type => "datetime",
131
    datetime_undef_if_invalid => 1,
132
    is_nullable => 1,
133
  },
134
);
135
136
=head1 PRIMARY KEY
137
138
=over 4
139
140
=item * L</holding_id>
141
142
=back
143
144
=cut
145
146
__PACKAGE__->set_primary_key("holding_id");
147
148
=head1 RELATIONS
149
150
=head2 biblionumber
151
152
Type: belongs_to
153
154
Related object: L<Koha::Schema::Result::Biblio>
155
156
=cut
157
158
__PACKAGE__->belongs_to(
159
  "biblionumber",
160
  "Koha::Schema::Result::Biblio",
161
  { biblionumber => "biblionumber" },
162
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
163
);
164
165
=head2 holdingbranch
166
167
Type: belongs_to
168
169
Related object: L<Koha::Schema::Result::Branch>
170
171
=cut
172
173
__PACKAGE__->belongs_to(
174
  "holdingbranch",
175
  "Koha::Schema::Result::Branch",
176
  { branchcode => "holdingbranch" },
177
  {
178
    is_deferrable => 1,
179
    join_type     => "LEFT",
180
    on_delete     => "RESTRICT",
181
    on_update     => "CASCADE",
182
  },
183
);
184
185
=head2 holdings_metadatas
186
187
Type: has_many
188
189
Related object: L<Koha::Schema::Result::HoldingsMetadata>
190
191
=cut
192
193
__PACKAGE__->has_many(
194
  "holdings_metadatas",
195
  "Koha::Schema::Result::HoldingsMetadata",
196
  { "foreign.holding_id" => "self.holding_id" },
197
  { cascade_copy => 0, cascade_delete => 0 },
198
);
199
200
=head2 items
201
202
Type: has_many
203
204
Related object: L<Koha::Schema::Result::Item>
205
206
=cut
207
208
__PACKAGE__->has_many(
209
  "items",
210
  "Koha::Schema::Result::Item",
211
  { "foreign.holding_id" => "self.holding_id" },
212
  { cascade_copy => 0, cascade_delete => 0 },
213
);
214
215
216
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-02-20 16:55:21
217
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:euhmcjiKZIgn7oueD8D9mQ
218
219
220
# You can replace this text with custom code or comments, and it will be preserved on regeneration
221
1;
(-)a/Koha/Schema/Result/HoldingsMetadata.pm (+138 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::HoldingsMetadata;
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::HoldingsMetadata
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<holdings_metadata>
19
20
=cut
21
22
__PACKAGE__->table("holdings_metadata");
23
24
=head1 ACCESSORS
25
26
=head2 id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 holding_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 format
39
40
  data_type: 'varchar'
41
  is_nullable: 0
42
  size: 16
43
44
=head2 schema
45
46
  data_type: 'varchar'
47
  is_nullable: 0
48
  size: 16
49
50
=head2 metadata
51
52
  data_type: 'longtext'
53
  is_nullable: 0
54
55
=head2 deleted_on
56
57
  data_type: 'datetime'
58
  datetime_undef_if_invalid: 1
59
  is_nullable: 1
60
61
=cut
62
63
__PACKAGE__->add_columns(
64
  "id",
65
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
66
  "holding_id",
67
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
68
  "format",
69
  { data_type => "varchar", is_nullable => 0, size => 16 },
70
  "schema",
71
  { data_type => "varchar", is_nullable => 0, size => 16 },
72
  "metadata",
73
  { data_type => "longtext", is_nullable => 0 },
74
  "deleted_on",
75
  {
76
    data_type => "datetime",
77
    datetime_undef_if_invalid => 1,
78
    is_nullable => 1,
79
  },
80
);
81
82
=head1 PRIMARY KEY
83
84
=over 4
85
86
=item * L</id>
87
88
=back
89
90
=cut
91
92
__PACKAGE__->set_primary_key("id");
93
94
=head1 UNIQUE CONSTRAINTS
95
96
=head2 C<holdings_metadata_uniq_key>
97
98
=over 4
99
100
=item * L</holding_id>
101
102
=item * L</format>
103
104
=item * L</schema>
105
106
=back
107
108
=cut
109
110
__PACKAGE__->add_unique_constraint(
111
  "holdings_metadata_uniq_key",
112
  ["holding_id", "format", "schema"],
113
);
114
115
=head1 RELATIONS
116
117
=head2 holding
118
119
Type: belongs_to
120
121
Related object: L<Koha::Schema::Result::Holding>
122
123
=cut
124
125
__PACKAGE__->belongs_to(
126
  "holding",
127
  "Koha::Schema::Result::Holding",
128
  { holding_id => "holding_id" },
129
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
130
);
131
132
133
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-02-20 16:55:21
134
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:42bY17ncjs1OZKH23z4SgQ
135
136
137
# You can replace this text with custom code or comments, and it will be preserved on regeneration
138
1;
(-)a/Koha/Schema/Result/Item.pm (-5 / +32 lines)
Lines 202-208 __PACKAGE__->table("items"); Link Here
202
202
203
  data_type: 'timestamp'
203
  data_type: 'timestamp'
204
  datetime_undef_if_invalid: 1
204
  datetime_undef_if_invalid: 1
205
  default_value: current_timestamp
205
  default_value: 'current_timestamp()'
206
  is_nullable: 0
206
  is_nullable: 0
207
207
208
=head2 location
208
=head2 location
Lines 286-291 __PACKAGE__->table("items"); Link Here
286
  is_nullable: 1
286
  is_nullable: 1
287
  size: 32
287
  size: 32
288
288
289
=head2 holding_id
290
291
  data_type: 'integer'
292
  is_foreign_key: 1
293
  is_nullable: 1
294
289
=cut
295
=cut
290
296
291
__PACKAGE__->add_columns(
297
__PACKAGE__->add_columns(
Lines 375-381 __PACKAGE__->add_columns( Link Here
375
  {
381
  {
376
    data_type => "timestamp",
382
    data_type => "timestamp",
377
    datetime_undef_if_invalid => 1,
383
    datetime_undef_if_invalid => 1,
378
    default_value => \"current_timestamp",
384
    default_value => "current_timestamp()",
379
    is_nullable => 0,
385
    is_nullable => 0,
380
  },
386
  },
381
  "location",
387
  "location",
Lines 406-411 __PACKAGE__->add_columns( Link Here
406
  { data_type => "varchar", is_nullable => 1, size => 32 },
412
  { data_type => "varchar", is_nullable => 1, size => 32 },
407
  "new_status",
413
  "new_status",
408
  { data_type => "varchar", is_nullable => 1, size => 32 },
414
  { data_type => "varchar", is_nullable => 1, size => 32 },
415
  "holding_id",
416
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
409
);
417
);
410
418
411
=head1 PRIMARY KEY
419
=head1 PRIMARY KEY
Lines 556-561 __PACKAGE__->might_have( Link Here
556
  { cascade_copy => 0, cascade_delete => 0 },
564
  { cascade_copy => 0, cascade_delete => 0 },
557
);
565
);
558
566
567
=head2 holding
568
569
Type: belongs_to
570
571
Related object: L<Koha::Schema::Result::Holding>
572
573
=cut
574
575
__PACKAGE__->belongs_to(
576
  "holding",
577
  "Koha::Schema::Result::Holding",
578
  { holding_id => "holding_id" },
579
  {
580
    is_deferrable => 1,
581
    join_type     => "LEFT",
582
    on_delete     => "CASCADE",
583
    on_update     => "CASCADE",
584
  },
585
);
586
559
=head2 holdingbranch
587
=head2 holdingbranch
560
588
561
Type: belongs_to
589
Type: belongs_to
Lines 702-709 __PACKAGE__->might_have( Link Here
702
);
730
);
703
731
704
732
705
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-09 15:50:42
733
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-02-20 16:49:09
706
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PQvA8qoxvTe4In5/oa5WIQ
734
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YyBBnr/pP/jDhq4iA0HGGA
707
735
708
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
736
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
709
737
710
- 

Return to bug 20447