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 181-186 __PACKAGE__->has_many( Link Here
181
  { cascade_copy => 0, cascade_delete => 0 },
190
  { cascade_copy => 0, cascade_delete => 0 },
182
);
191
);
183
192
193
=head2 itemtypes
194
195
Type: has_many
196
197
Related object: L<Koha::Schema::Result::Itemtype>
198
199
=cut
200
201
__PACKAGE__->has_many(
202
  "itemtypes",
203
  "Koha::Schema::Result::Itemtype",
204
  { "foreign.parent_type" => "self.itemtype" },
205
  { cascade_copy => 0, cascade_delete => 0 },
206
);
207
184
=head2 itemtypes_branches
208
=head2 itemtypes_branches
185
209
186
Type: has_many
210
Type: has_many
Lines 211-216 __PACKAGE__->has_many( Link Here
211
  { cascade_copy => 0, cascade_delete => 0 },
235
  { cascade_copy => 0, cascade_delete => 0 },
212
);
236
);
213
237
238
=head2 parent_type
239
240
Type: belongs_to
241
242
Related object: L<Koha::Schema::Result::Itemtype>
243
244
=cut
245
246
__PACKAGE__->belongs_to(
247
  "parent_type",
248
  "Koha::Schema::Result::Itemtype",
249
  { itemtype => "parent_type" },
250
  {
251
    is_deferrable => 1,
252
    join_type     => "LEFT",
253
    on_delete     => "CASCADE",
254
    on_update     => "CASCADE",
255
  },
256
);
257
214
=head2 reserves
258
=head2 reserves
215
259
216
Type: has_many
260
Type: has_many
Lines 227-234 __PACKAGE__->has_many( Link Here
227
);
271
);
228
272
229
273
230
# Created by DBIx::Class::Schema::Loader v0.07048 @ 2019-07-04 04:56:48
274
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-09-21 02:35:28
231
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Qo6jabJSQGeYJ542ebSJfg
275
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TB3xxE+zR4PcJtR3FYMZoQ
232
276
233
# Use the ItemtypeLocalization view to create the join on localization
277
# Use the ItemtypeLocalization view to create the join on localization
234
our $LANGUAGE;
278
our $LANGUAGE;
235
- 

Return to bug 21946