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

(-)a/Koha/Schema/Result/Itemtype.pm (-3 / +46 lines)
Lines 30-35 __PACKAGE__->table("itemtypes"); Link Here
30
  is_nullable: 0
30
  is_nullable: 0
31
  size: 10
31
  size: 10
32
32
33
=head2 parent_type
34
35
  data_type: 'varchar'
36
  is_foreign_key: 1
37
  is_nullable: 1
38
  size: 10
39
33
=head2 description
40
=head2 description
34
41
35
  data_type: 'longtext'
42
  data_type: 'longtext'
Lines 117-122 __PACKAGE__->table("itemtypes"); Link Here
117
__PACKAGE__->add_columns(
124
__PACKAGE__->add_columns(
118
  "itemtype",
125
  "itemtype",
119
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
126
  { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 },
127
  "parent_type",
128
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
120
  "description",
129
  "description",
121
  { data_type => "longtext", is_nullable => 1 },
130
  { data_type => "longtext", is_nullable => 1 },
122
  "rentalcharge",
131
  "rentalcharge",
Lines 211-216 __PACKAGE__->might_have( Link Here
211
  { cascade_copy => 0, cascade_delete => 0 },
220
  { cascade_copy => 0, cascade_delete => 0 },
212
);
221
);
213
222
223
=head2 itemtypes
224
225
Type: has_many
226
227
Related object: L<Koha::Schema::Result::Itemtype>
228
229
=cut
230
231
__PACKAGE__->has_many(
232
  "itemtypes",
233
  "Koha::Schema::Result::Itemtype",
234
  { "foreign.parent_type" => "self.itemtype" },
235
  { cascade_copy => 0, cascade_delete => 0 },
236
);
237
214
=head2 old_reserves
238
=head2 old_reserves
215
239
216
Type: has_many
240
Type: has_many
Lines 226-231 __PACKAGE__->has_many( Link Here
226
  { cascade_copy => 0, cascade_delete => 0 },
250
  { cascade_copy => 0, cascade_delete => 0 },
227
);
251
);
228
252
253
=head2 parent_type
254
255
Type: belongs_to
256
257
Related object: L<Koha::Schema::Result::Itemtype>
258
259
=cut
260
261
__PACKAGE__->belongs_to(
262
  "parent_type",
263
  "Koha::Schema::Result::Itemtype",
264
  { itemtype => "parent_type" },
265
  {
266
    is_deferrable => 1,
267
    join_type     => "LEFT",
268
    on_delete     => "CASCADE",
269
    on_update     => "CASCADE",
270
  },
271
);
272
229
=head2 reserves
273
=head2 reserves
230
274
231
Type: has_many
275
Type: has_many
Lines 242-249 __PACKAGE__->has_many( Link Here
242
);
286
);
243
287
244
288
245
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-07 17:30:46
289
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2019-03-13 00:35:58
246
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CDIOU6LmF7suaujk1NQOeg
290
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Gg6idjbhkKwVaD4yhYF+Kw
247
291
248
# Use the ItemtypeLocalization view to create the join on localization
292
# Use the ItemtypeLocalization view to create the join on localization
249
our $LANGUAGE;
293
our $LANGUAGE;
250
- 

Return to bug 21946