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

(-)a/Koha/Schema/Result/Biblio.pm (-16 / +16 lines)
Lines 210-257 __PACKAGE__->has_many( Link Here
210
  { cascade_copy => 0, cascade_delete => 0 },
210
  { cascade_copy => 0, cascade_delete => 0 },
211
);
211
);
212
212
213
=head2 biblioimages
213
=head2 biblioitems
214
214
215
Type: has_many
215
Type: has_many
216
216
217
Related object: L<Koha::Schema::Result::Biblioimage>
217
Related object: L<Koha::Schema::Result::Biblioitem>
218
218
219
=cut
219
=cut
220
220
221
__PACKAGE__->has_many(
221
__PACKAGE__->has_many(
222
  "biblioimages",
222
  "biblioitems",
223
  "Koha::Schema::Result::Biblioimage",
223
  "Koha::Schema::Result::Biblioitem",
224
  { "foreign.biblionumber" => "self.biblionumber" },
224
  { "foreign.biblionumber" => "self.biblionumber" },
225
  { cascade_copy => 0, cascade_delete => 0 },
225
  { cascade_copy => 0, cascade_delete => 0 },
226
);
226
);
227
227
228
=head2 biblioitems
228
=head2 club_holds
229
229
230
Type: has_many
230
Type: has_many
231
231
232
Related object: L<Koha::Schema::Result::Biblioitem>
232
Related object: L<Koha::Schema::Result::ClubHold>
233
233
234
=cut
234
=cut
235
235
236
__PACKAGE__->has_many(
236
__PACKAGE__->has_many(
237
  "biblioitems",
237
  "club_holds",
238
  "Koha::Schema::Result::Biblioitem",
238
  "Koha::Schema::Result::ClubHold",
239
  { "foreign.biblionumber" => "self.biblionumber" },
239
  { "foreign.biblio_id" => "self.biblionumber" },
240
  { cascade_copy => 0, cascade_delete => 0 },
240
  { cascade_copy => 0, cascade_delete => 0 },
241
);
241
);
242
242
243
=head2 club_holds
243
=head2 cover_images
244
244
245
Type: has_many
245
Type: has_many
246
246
247
Related object: L<Koha::Schema::Result::ClubHold>
247
Related object: L<Koha::Schema::Result::CoverImage>
248
248
249
=cut
249
=cut
250
250
251
__PACKAGE__->has_many(
251
__PACKAGE__->has_many(
252
  "club_holds",
252
  "cover_images",
253
  "Koha::Schema::Result::ClubHold",
253
  "Koha::Schema::Result::CoverImage",
254
  { "foreign.biblio_id" => "self.biblionumber" },
254
  { "foreign.biblionumber" => "self.biblionumber" },
255
  { cascade_copy => 0, cascade_delete => 0 },
255
  { cascade_copy => 0, cascade_delete => 0 },
256
);
256
);
257
257
Lines 451-458 __PACKAGE__->has_many( Link Here
451
);
451
);
452
452
453
453
454
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-17 09:15:51
454
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-09-18 10:16:50
455
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p2SIq565zPyE3ZUkSuXyBA
455
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JwJoUHVr48DdTaT5qGN6tw
456
456
457
457
458
__PACKAGE__->has_one(
458
__PACKAGE__->has_one(
(-)a/Koha/Schema/Result/CoverImage.pm (+151 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::CoverImage;
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::CoverImage
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<cover_images>
19
20
=cut
21
22
__PACKAGE__->table("cover_images");
23
24
=head1 ACCESSORS
25
26
=head2 imagenumber
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 biblionumber
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 1
37
38
=head2 itemnumber
39
40
  data_type: 'integer'
41
  is_foreign_key: 1
42
  is_nullable: 1
43
44
=head2 mimetype
45
46
  data_type: 'varchar'
47
  is_nullable: 0
48
  size: 15
49
50
=head2 imagefile
51
52
  data_type: 'mediumblob'
53
  is_nullable: 0
54
55
=head2 thumbnail
56
57
  data_type: 'mediumblob'
58
  is_nullable: 0
59
60
=head2 timestamp
61
62
  data_type: 'timestamp'
63
  datetime_undef_if_invalid: 1
64
  default_value: current_timestamp
65
  is_nullable: 0
66
67
=cut
68
69
__PACKAGE__->add_columns(
70
  "imagenumber",
71
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
72
  "biblionumber",
73
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
74
  "itemnumber",
75
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
76
  "mimetype",
77
  { data_type => "varchar", is_nullable => 0, size => 15 },
78
  "imagefile",
79
  { data_type => "mediumblob", is_nullable => 0 },
80
  "thumbnail",
81
  { data_type => "mediumblob", is_nullable => 0 },
82
  "timestamp",
83
  {
84
    data_type => "timestamp",
85
    datetime_undef_if_invalid => 1,
86
    default_value => \"current_timestamp",
87
    is_nullable => 0,
88
  },
89
);
90
91
=head1 PRIMARY KEY
92
93
=over 4
94
95
=item * L</imagenumber>
96
97
=back
98
99
=cut
100
101
__PACKAGE__->set_primary_key("imagenumber");
102
103
=head1 RELATIONS
104
105
=head2 biblionumber
106
107
Type: belongs_to
108
109
Related object: L<Koha::Schema::Result::Biblio>
110
111
=cut
112
113
__PACKAGE__->belongs_to(
114
  "biblionumber",
115
  "Koha::Schema::Result::Biblio",
116
  { biblionumber => "biblionumber" },
117
  {
118
    is_deferrable => 1,
119
    join_type     => "LEFT",
120
    on_delete     => "CASCADE",
121
    on_update     => "CASCADE",
122
  },
123
);
124
125
=head2 itemnumber
126
127
Type: belongs_to
128
129
Related object: L<Koha::Schema::Result::Item>
130
131
=cut
132
133
__PACKAGE__->belongs_to(
134
  "itemnumber",
135
  "Koha::Schema::Result::Item",
136
  { itemnumber => "itemnumber" },
137
  {
138
    is_deferrable => 1,
139
    join_type     => "LEFT",
140
    on_delete     => "CASCADE",
141
    on_update     => "CASCADE",
142
  },
143
);
144
145
146
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-09-18 10:16:50
147
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bcT7VxNm+4Uk+l03sM1MZg
148
149
150
# You can replace this text with custom code or comments, and it will be preserved on regeneration
151
1;
(-)a/Koha/Schema/Result/Item.pm (-3 / +17 lines)
Lines 548-553 __PACKAGE__->might_have( Link Here
548
  { cascade_copy => 0, cascade_delete => 0 },
548
  { cascade_copy => 0, cascade_delete => 0 },
549
);
549
);
550
550
551
=head2 cover_images
552
553
Type: has_many
554
555
Related object: L<Koha::Schema::Result::CoverImage>
556
557
=cut
558
559
__PACKAGE__->has_many(
560
  "cover_images",
561
  "Koha::Schema::Result::CoverImage",
562
  { "foreign.itemnumber" => "self.itemnumber" },
563
  { cascade_copy => 0, cascade_delete => 0 },
564
);
565
551
=head2 creator_batches
566
=head2 creator_batches
552
567
553
Type: has_many
568
Type: has_many
Lines 754-761 __PACKAGE__->has_many( Link Here
754
);
769
);
755
770
756
771
757
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-06-05 20:21:47
772
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-09-18 10:16:50
758
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9AxhV/hJnavWY4OTDTNRcQ
773
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kvv/3fnYpG3apwKs4/3ozg
759
774
760
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
775
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
761
776
762
- 

Return to bug 26145