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

(-)a/Koha/Schema/Result/Item.pm (-2 / +47 lines)
Lines 729-734 __PACKAGE__->might_have( Link Here
729
  { cascade_copy => 0, cascade_delete => 0 },
729
  { cascade_copy => 0, cascade_delete => 0 },
730
);
730
);
731
731
732
=head2 item_bundles_hosts
733
734
Type: has_many
735
736
Related object: L<Koha::Schema::Result::ItemBundle>
737
738
=cut
739
740
__PACKAGE__->has_many(
741
  "item_bundles_hosts",
742
  "Koha::Schema::Result::ItemBundle",
743
  { "foreign.host" => "self.itemnumber" },
744
  { cascade_copy => 0, cascade_delete => 0 },
745
);
746
747
=head2 item_bundles_item
748
749
Type: might_have
750
751
Related object: L<Koha::Schema::Result::ItemBundle>
752
753
=cut
754
755
__PACKAGE__->might_have(
756
  "item_bundles_item",
757
  "Koha::Schema::Result::ItemBundle",
758
  { "foreign.item" => "self.itemnumber" },
759
  { cascade_copy => 0, cascade_delete => 0 },
760
);
761
732
=head2 items_last_borrower
762
=head2 items_last_borrower
733
763
734
Type: might_have
764
Type: might_have
Lines 744-749 __PACKAGE__->might_have( Link Here
744
  { cascade_copy => 0, cascade_delete => 0 },
774
  { cascade_copy => 0, cascade_delete => 0 },
745
);
775
);
746
776
777
=head2 items_lost_issue
778
779
Type: might_have
780
781
Related object: L<Koha::Schema::Result::ItemsLostIssue>
782
783
=cut
784
785
__PACKAGE__->might_have(
786
  "items_lost_issue",
787
  "Koha::Schema::Result::ItemsLostIssue",
788
  { "foreign.itemnumber" => "self.itemnumber" },
789
  { cascade_copy => 0, cascade_delete => 0 },
790
);
791
747
=head2 linktrackers
792
=head2 linktrackers
748
793
749
Type: has_many
794
Type: has_many
Lines 865-872 __PACKAGE__->has_many( Link Here
865
);
910
);
866
911
867
912
868
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-27 08:42:21
913
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-23 07:00:41
869
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SjZn3haOtUZWu1jrMigjNQ
914
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/LUKEnOVCeXHPYDqV7HGRg
870
915
871
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
916
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
872
917
(-)a/Koha/Schema/Result/ItemBundle.pm (+113 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::ItemBundle;
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::ItemBundle
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<item_bundles>
19
20
=cut
21
22
__PACKAGE__->table("item_bundles");
23
24
=head1 ACCESSORS
25
26
=head2 item
27
28
  data_type: 'integer'
29
  is_foreign_key: 1
30
  is_nullable: 0
31
32
=head2 host
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=cut
39
40
__PACKAGE__->add_columns(
41
  "item",
42
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
43
  "host",
44
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
45
);
46
47
=head1 PRIMARY KEY
48
49
=over 4
50
51
=item * L</host>
52
53
=item * L</item>
54
55
=back
56
57
=cut
58
59
__PACKAGE__->set_primary_key("host", "item");
60
61
=head1 UNIQUE CONSTRAINTS
62
63
=head2 C<item_bundles_uniq_1>
64
65
=over 4
66
67
=item * L</item>
68
69
=back
70
71
=cut
72
73
__PACKAGE__->add_unique_constraint("item_bundles_uniq_1", ["item"]);
74
75
=head1 RELATIONS
76
77
=head2 host
78
79
Type: belongs_to
80
81
Related object: L<Koha::Schema::Result::Item>
82
83
=cut
84
85
__PACKAGE__->belongs_to(
86
  "host",
87
  "Koha::Schema::Result::Item",
88
  { itemnumber => "host" },
89
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
90
);
91
92
=head2 item
93
94
Type: belongs_to
95
96
Related object: L<Koha::Schema::Result::Item>
97
98
=cut
99
100
__PACKAGE__->belongs_to(
101
  "item",
102
  "Koha::Schema::Result::Item",
103
  { itemnumber => "item" },
104
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
105
);
106
107
108
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-08-10 13:47:56
109
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QXlgF8iwZUFSsg+Eo5kNUw
110
111
112
# You can replace this text with custom code or comments, and it will be preserved on regeneration
113
1;
(-)a/Koha/Schema/Result/ItemsLostIssue.pm (+138 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::ItemsLostIssue;
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::ItemsLostIssue
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<items_lost_issue>
19
20
=cut
21
22
__PACKAGE__->table("items_lost_issue");
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 itemnumber
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 issue_id
39
40
  data_type: 'integer'
41
  is_foreign_key: 1
42
  is_nullable: 1
43
44
=head2 created_on
45
46
  data_type: 'timestamp'
47
  datetime_undef_if_invalid: 1
48
  default_value: current_timestamp
49
  is_nullable: 0
50
51
=cut
52
53
__PACKAGE__->add_columns(
54
  "id",
55
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
56
  "itemnumber",
57
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
58
  "issue_id",
59
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
60
  "created_on",
61
  {
62
    data_type => "timestamp",
63
    datetime_undef_if_invalid => 1,
64
    default_value => \"current_timestamp",
65
    is_nullable => 0,
66
  },
67
);
68
69
=head1 PRIMARY KEY
70
71
=over 4
72
73
=item * L</id>
74
75
=back
76
77
=cut
78
79
__PACKAGE__->set_primary_key("id");
80
81
=head1 UNIQUE CONSTRAINTS
82
83
=head2 C<itemnumber>
84
85
=over 4
86
87
=item * L</itemnumber>
88
89
=back
90
91
=cut
92
93
__PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]);
94
95
=head1 RELATIONS
96
97
=head2 issue
98
99
Type: belongs_to
100
101
Related object: L<Koha::Schema::Result::OldIssue>
102
103
=cut
104
105
__PACKAGE__->belongs_to(
106
  "issue",
107
  "Koha::Schema::Result::OldIssue",
108
  { issue_id => "issue_id" },
109
  {
110
    is_deferrable => 1,
111
    join_type     => "LEFT",
112
    on_delete     => "SET NULL",
113
    on_update     => "CASCADE",
114
  },
115
);
116
117
=head2 itemnumber
118
119
Type: belongs_to
120
121
Related object: L<Koha::Schema::Result::Item>
122
123
=cut
124
125
__PACKAGE__->belongs_to(
126
  "itemnumber",
127
  "Koha::Schema::Result::Item",
128
  { itemnumber => "itemnumber" },
129
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
130
);
131
132
133
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-23 07:00:41
134
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8QBruozDPiIGKamb3U2Wxw
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/OldIssue.pm (-3 / +17 lines)
Lines 305-313 __PACKAGE__->belongs_to( Link Here
305
  },
305
  },
306
);
306
);
307
307
308
=head2 items_lost_issues
308
309
309
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
310
Type: has_many
310
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BWwXBAuls9a0HhscR0WlGQ
311
312
Related object: L<Koha::Schema::Result::ItemsLostIssue>
313
314
=cut
315
316
__PACKAGE__->has_many(
317
  "items_lost_issues",
318
  "Koha::Schema::Result::ItemsLostIssue",
319
  { "foreign.issue_id" => "self.issue_id" },
320
  { cascade_copy => 0, cascade_delete => 0 },
321
);
322
323
324
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-09-23 07:00:41
325
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RYZFozdomZ0NrvimL6+YZQ
311
326
312
__PACKAGE__->add_columns(
327
__PACKAGE__->add_columns(
313
    '+auto_renew'      => { is_boolean => 1 },
328
    '+auto_renew'      => { is_boolean => 1 },
314
- 

Return to bug 28854