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

(-)a/Koha/Schema/Result/AccountCredit.pm (+200 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountCredit;
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::AccountCredit
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_credits>
19
20
=cut
21
22
__PACKAGE__->table("account_credits");
23
24
=head1 ACCESSORS
25
26
=head2 credit_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 borrowernumber
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 0
37
38
=head2 type
39
40
  data_type: 'varchar'
41
  is_nullable: 0
42
  size: 255
43
44
=head2 amount_received
45
46
  data_type: 'decimal'
47
  is_nullable: 1
48
  size: [28,6]
49
50
=head2 amount_paid
51
52
  data_type: 'decimal'
53
  is_nullable: 0
54
  size: [28,6]
55
56
=head2 amount_remaining
57
58
  data_type: 'decimal'
59
  is_nullable: 0
60
  size: [28,6]
61
62
=head2 notes
63
64
  data_type: 'text'
65
  is_nullable: 1
66
67
=head2 branchcode
68
69
  data_type: 'varchar'
70
  is_foreign_key: 1
71
  is_nullable: 1
72
  size: 10
73
74
=head2 manager_id
75
76
  data_type: 'integer'
77
  is_nullable: 1
78
79
=head2 created_on
80
81
  data_type: 'timestamp'
82
  datetime_undef_if_invalid: 1
83
  is_nullable: 1
84
85
=head2 updated_on
86
87
  data_type: 'timestamp'
88
  datetime_undef_if_invalid: 1
89
  is_nullable: 1
90
91
=cut
92
93
__PACKAGE__->add_columns(
94
  "credit_id",
95
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
96
  "borrowernumber",
97
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
98
  "type",
99
  { data_type => "varchar", is_nullable => 0, size => 255 },
100
  "amount_received",
101
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
102
  "amount_paid",
103
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
104
  "amount_remaining",
105
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
106
  "notes",
107
  { data_type => "text", is_nullable => 1 },
108
  "branchcode",
109
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
110
  "manager_id",
111
  { data_type => "integer", is_nullable => 1 },
112
  "created_on",
113
  {
114
    data_type => "timestamp",
115
    datetime_undef_if_invalid => 1,
116
    is_nullable => 1,
117
  },
118
  "updated_on",
119
  {
120
    data_type => "timestamp",
121
    datetime_undef_if_invalid => 1,
122
    is_nullable => 1,
123
  },
124
);
125
126
=head1 PRIMARY KEY
127
128
=over 4
129
130
=item * L</credit_id>
131
132
=back
133
134
=cut
135
136
__PACKAGE__->set_primary_key("credit_id");
137
138
=head1 RELATIONS
139
140
=head2 account_offsets
141
142
Type: has_many
143
144
Related object: L<Koha::Schema::Result::AccountOffset>
145
146
=cut
147
148
__PACKAGE__->has_many(
149
  "account_offsets",
150
  "Koha::Schema::Result::AccountOffset",
151
  { "foreign.credit_id" => "self.credit_id" },
152
  { cascade_copy => 0, cascade_delete => 0 },
153
);
154
155
=head2 borrowernumber
156
157
Type: belongs_to
158
159
Related object: L<Koha::Schema::Result::Borrower>
160
161
=cut
162
163
__PACKAGE__->belongs_to(
164
  "borrowernumber",
165
  "Koha::Schema::Result::Borrower",
166
  { borrowernumber => "borrowernumber" },
167
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
168
);
169
170
=head2 branchcode
171
172
Type: belongs_to
173
174
Related object: L<Koha::Schema::Result::Branch>
175
176
=cut
177
178
__PACKAGE__->belongs_to(
179
  "branchcode",
180
  "Koha::Schema::Result::Branch",
181
  { branchcode => "branchcode" },
182
  {
183
    is_deferrable => 1,
184
    join_type     => "LEFT",
185
    on_delete     => "CASCADE",
186
    on_update     => "CASCADE",
187
  },
188
);
189
190
191
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:08:16
192
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lkoQZ4EQDlmD9vpZQ7k7mA
193
194
__PACKAGE__->belongs_to(
195
  "borrower",
196
  "Koha::Schema::Result::Borrower",
197
  { borrowernumber => "borrowernumber" },
198
);
199
200
1;
(-)a/Koha/Schema/Result/AccountDebit.pm (+261 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountDebit;
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::AccountDebit
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_debits>
19
20
=cut
21
22
__PACKAGE__->table("account_debits");
23
24
=head1 ACCESSORS
25
26
=head2 debit_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 borrowernumber
33
34
  data_type: 'integer'
35
  default_value: 0
36
  is_foreign_key: 1
37
  is_nullable: 0
38
39
=head2 itemnumber
40
41
  data_type: 'integer'
42
  is_nullable: 1
43
44
=head2 issue_id
45
46
  data_type: 'integer'
47
  is_nullable: 1
48
49
=head2 type
50
51
  data_type: 'varchar'
52
  is_nullable: 0
53
  size: 255
54
55
=head2 accruing
56
57
  data_type: 'tinyint'
58
  default_value: 0
59
  is_nullable: 0
60
61
=head2 amount_original
62
63
  data_type: 'decimal'
64
  is_nullable: 1
65
  size: [28,6]
66
67
=head2 amount_outstanding
68
69
  data_type: 'decimal'
70
  is_nullable: 1
71
  size: [28,6]
72
73
=head2 amount_last_increment
74
75
  data_type: 'decimal'
76
  is_nullable: 1
77
  size: [28,6]
78
79
=head2 description
80
81
  data_type: 'mediumtext'
82
  is_nullable: 1
83
84
=head2 notes
85
86
  data_type: 'text'
87
  is_nullable: 1
88
89
=head2 branchcode
90
91
  data_type: 'varchar'
92
  is_foreign_key: 1
93
  is_nullable: 1
94
  size: 10
95
96
=head2 manager_id
97
98
  data_type: 'integer'
99
  is_nullable: 1
100
101
=head2 created_on
102
103
  data_type: 'timestamp'
104
  datetime_undef_if_invalid: 1
105
  is_nullable: 1
106
107
=head2 updated_on
108
109
  data_type: 'timestamp'
110
  datetime_undef_if_invalid: 1
111
  is_nullable: 1
112
113
=cut
114
115
__PACKAGE__->add_columns(
116
  "debit_id",
117
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
118
  "borrowernumber",
119
  {
120
    data_type      => "integer",
121
    default_value  => 0,
122
    is_foreign_key => 1,
123
    is_nullable    => 0,
124
  },
125
  "itemnumber",
126
  { data_type => "integer", is_nullable => 1 },
127
  "issue_id",
128
  { data_type => "integer", is_nullable => 1 },
129
  "type",
130
  { data_type => "varchar", is_nullable => 0, size => 255 },
131
  "accruing",
132
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
133
  "amount_original",
134
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
135
  "amount_outstanding",
136
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
137
  "amount_last_increment",
138
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
139
  "description",
140
  { data_type => "mediumtext", is_nullable => 1 },
141
  "notes",
142
  { data_type => "text", is_nullable => 1 },
143
  "branchcode",
144
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
145
  "manager_id",
146
  { data_type => "integer", is_nullable => 1 },
147
  "created_on",
148
  {
149
    data_type => "timestamp",
150
    datetime_undef_if_invalid => 1,
151
    is_nullable => 1,
152
  },
153
  "updated_on",
154
  {
155
    data_type => "timestamp",
156
    datetime_undef_if_invalid => 1,
157
    is_nullable => 1,
158
  },
159
);
160
161
=head1 PRIMARY KEY
162
163
=over 4
164
165
=item * L</debit_id>
166
167
=back
168
169
=cut
170
171
__PACKAGE__->set_primary_key("debit_id");
172
173
=head1 RELATIONS
174
175
=head2 account_offsets
176
177
Type: has_many
178
179
Related object: L<Koha::Schema::Result::AccountOffset>
180
181
=cut
182
183
__PACKAGE__->has_many(
184
  "account_offsets",
185
  "Koha::Schema::Result::AccountOffset",
186
  { "foreign.debit_id" => "self.debit_id" },
187
  { cascade_copy => 0, cascade_delete => 0 },
188
);
189
190
=head2 borrowernumber
191
192
Type: belongs_to
193
194
Related object: L<Koha::Schema::Result::Borrower>
195
196
=cut
197
198
__PACKAGE__->belongs_to(
199
  "borrowernumber",
200
  "Koha::Schema::Result::Borrower",
201
  { borrowernumber => "borrowernumber" },
202
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
203
);
204
205
=head2 branchcode
206
207
Type: belongs_to
208
209
Related object: L<Koha::Schema::Result::Branch>
210
211
=cut
212
213
__PACKAGE__->belongs_to(
214
  "branchcode",
215
  "Koha::Schema::Result::Branch",
216
  { branchcode => "branchcode" },
217
  {
218
    is_deferrable => 1,
219
    join_type     => "LEFT",
220
    on_delete     => "CASCADE",
221
    on_update     => "CASCADE",
222
  },
223
);
224
225
226
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:03:44
227
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ns19xWix5RriwDPelPnhfw
228
229
__PACKAGE__->belongs_to(
230
  "item",
231
  "Koha::Schema::Result::Item",
232
  { itemnumber => "itemnumber" }
233
);
234
235
__PACKAGE__->belongs_to(
236
  "deleted_item",
237
  "Koha::Schema::Result::Deleteditem",
238
  { itemnumber => "itemnumber" }
239
);
240
241
__PACKAGE__->belongs_to(
242
  "issue",
243
  "Koha::Schema::Result::Issue",
244
  { issue_id => "issue_id" }
245
);
246
247
__PACKAGE__->belongs_to(
248
  "old_issue",
249
  "Koha::Schema::Result::OldIssue",
250
  { issue_id => "issue_id" }
251
);
252
253
__PACKAGE__->belongs_to(
254
  "borrower",
255
  "Koha::Schema::Result::Borrower",
256
  { borrowernumber => "borrowernumber" },
257
  { on_delete => "CASCADE", on_update => "CASCADE" },
258
);
259
260
# You can replace this text with custom content, and it will be preserved on regeneration
261
1;
(-)a/Koha/Schema/Result/AccountOffset.pm (+147 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::AccountOffset;
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::AccountOffset
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<account_offsets>
19
20
=cut
21
22
__PACKAGE__->table("account_offsets");
23
24
=head1 ACCESSORS
25
26
=head2 offset_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
32
=head2 debit_id
33
34
  data_type: 'integer'
35
  is_foreign_key: 1
36
  is_nullable: 1
37
38
=head2 credit_id
39
40
  data_type: 'integer'
41
  is_foreign_key: 1
42
  is_nullable: 1
43
44
=head2 type
45
46
  data_type: 'varchar'
47
  is_nullable: 1
48
  size: 255
49
50
=head2 amount
51
52
  data_type: 'decimal'
53
  is_nullable: 0
54
  size: [28,6]
55
56
A positive number here represents a payment, a negative is a increase in a fine.
57
58
=head2 created_on
59
60
  data_type: 'timestamp'
61
  datetime_undef_if_invalid: 1
62
  default_value: current_timestamp
63
  is_nullable: 0
64
65
=cut
66
67
__PACKAGE__->add_columns(
68
  "offset_id",
69
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
70
  "debit_id",
71
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
72
  "credit_id",
73
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
74
  "type",
75
  { data_type => "varchar", is_nullable => 1, size => 255 },
76
  "amount",
77
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
78
  "created_on",
79
  {
80
    data_type => "timestamp",
81
    datetime_undef_if_invalid => 1,
82
    default_value => \"current_timestamp",
83
    is_nullable => 0,
84
  },
85
);
86
87
=head1 PRIMARY KEY
88
89
=over 4
90
91
=item * L</offset_id>
92
93
=back
94
95
=cut
96
97
__PACKAGE__->set_primary_key("offset_id");
98
99
=head1 RELATIONS
100
101
=head2 credit
102
103
Type: belongs_to
104
105
Related object: L<Koha::Schema::Result::AccountCredit>
106
107
=cut
108
109
__PACKAGE__->belongs_to(
110
  "credit",
111
  "Koha::Schema::Result::AccountCredit",
112
  { credit_id => "credit_id" },
113
  {
114
    is_deferrable => 1,
115
    join_type     => "LEFT",
116
    on_delete     => "CASCADE",
117
    on_update     => "CASCADE",
118
  },
119
);
120
121
=head2 debit
122
123
Type: belongs_to
124
125
Related object: L<Koha::Schema::Result::AccountDebit>
126
127
=cut
128
129
__PACKAGE__->belongs_to(
130
  "debit",
131
  "Koha::Schema::Result::AccountDebit",
132
  { debit_id => "debit_id" },
133
  {
134
    is_deferrable => 1,
135
    join_type     => "LEFT",
136
    on_delete     => "CASCADE",
137
    on_update     => "CASCADE",
138
  },
139
);
140
141
142
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:03:45
143
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CQJiVGoCnQEzkVu9ssgU/Q
144
145
146
# You can replace this text with custom content, and it will be preserved on regeneration
147
1;
(-)a/Koha/Schema/Result/Borrower.pm (-9 / +21 lines)
Lines 407-412 __PACKAGE__->table("borrowers"); Link Here
407
  default_value: 1
407
  default_value: 1
408
  is_nullable: 0
408
  is_nullable: 0
409
409
410
=head2 account_balance
411
412
  data_type: 'decimal'
413
  is_nullable: 0
414
  size: [28,6]
415
410
=cut
416
=cut
411
417
412
__PACKAGE__->add_columns(
418
__PACKAGE__->add_columns(
Lines 576-581 __PACKAGE__->add_columns( Link Here
576
  { data_type => "varchar", is_nullable => 1, size => 50 },
582
  { data_type => "varchar", is_nullable => 1, size => 50 },
577
  "privacy",
583
  "privacy",
578
  { data_type => "integer", default_value => 1, is_nullable => 0 },
584
  { data_type => "integer", default_value => 1, is_nullable => 0 },
585
  "account_balance",
586
  { data_type => "decimal", is_nullable => 0, size => [28, 6] },
579
);
587
);
580
588
581
=head1 PRIMARY KEY
589
=head1 PRIMARY KEY
Lines 606-637 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]); Link Here
606
614
607
=head1 RELATIONS
615
=head1 RELATIONS
608
616
609
=head2 accountlines
617
=head2 account_credits
610
618
611
Type: has_many
619
Type: has_many
612
620
613
Related object: L<Koha::Schema::Result::Accountline>
621
Related object: L<Koha::Schema::Result::AccountCredit>
614
622
615
=cut
623
=cut
616
624
617
__PACKAGE__->has_many(
625
__PACKAGE__->has_many(
618
  "accountlines",
626
  "account_credits",
619
  "Koha::Schema::Result::Accountline",
627
  "Koha::Schema::Result::AccountCredit",
620
  { "foreign.borrowernumber" => "self.borrowernumber" },
628
  { "foreign.borrowernumber" => "self.borrowernumber" },
621
  { cascade_copy => 0, cascade_delete => 0 },
629
  { cascade_copy => 0, cascade_delete => 0 },
622
);
630
);
623
631
624
=head2 accountoffsets
632
=head2 account_debits
625
633
626
Type: has_many
634
Type: has_many
627
635
628
Related object: L<Koha::Schema::Result::Accountoffset>
636
Related object: L<Koha::Schema::Result::AccountDebit>
629
637
630
=cut
638
=cut
631
639
632
__PACKAGE__->has_many(
640
__PACKAGE__->has_many(
633
  "accountoffsets",
641
  "account_debits",
634
  "Koha::Schema::Result::Accountoffset",
642
  "Koha::Schema::Result::AccountDebit",
635
  { "foreign.borrowernumber" => "self.borrowernumber" },
643
  { "foreign.borrowernumber" => "self.borrowernumber" },
636
  { cascade_copy => 0, cascade_delete => 0 },
644
  { cascade_copy => 0, cascade_delete => 0 },
637
);
645
);
Lines 1105-1110 __PACKAGE__->many_to_many("courses", "course_instructors", "course"); Link Here
1105
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-18 13:01:05
1113
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-08-18 13:01:05
1106
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZzZiKYN4b/LuEARX4rawhA
1114
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZzZiKYN4b/LuEARX4rawhA
1107
1115
1116
__PACKAGE__->belongs_to(
1117
    "branch",
1118
    "Koha::Schema::Result::Branch",
1119
    { branchcode => "branchcode" },
1120
);
1108
1121
1109
# You can replace this text with custom content, and it will be preserved on regeneration
1110
1;
1122
1;
(-)a/Koha/Schema/Result/Branch.pm (-3 / +33 lines)
Lines 173-178 __PACKAGE__->set_primary_key("branchcode"); Link Here
173
173
174
=head1 RELATIONS
174
=head1 RELATIONS
175
175
176
=head2 account_credits
177
178
Type: has_many
179
180
Related object: L<Koha::Schema::Result::AccountCredit>
181
182
=cut
183
184
__PACKAGE__->has_many(
185
  "account_credits",
186
  "Koha::Schema::Result::AccountCredit",
187
  { "foreign.branchcode" => "self.branchcode" },
188
  { cascade_copy => 0, cascade_delete => 0 },
189
);
190
191
=head2 account_debits
192
193
Type: has_many
194
195
Related object: L<Koha::Schema::Result::AccountDebit>
196
197
=cut
198
199
__PACKAGE__->has_many(
200
  "account_debits",
201
  "Koha::Schema::Result::AccountDebit",
202
  { "foreign.branchcode" => "self.branchcode" },
203
  { cascade_copy => 0, cascade_delete => 0 },
204
);
205
176
=head2 aqbaskets
206
=head2 aqbaskets
177
207
178
Type: has_many
208
Type: has_many
Lines 484-492 Composing rels: L</branchrelations> -> categorycode Link Here
484
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
514
__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode");
485
515
486
516
487
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-04-08 22:40:15
517
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:04:34
488
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1RVlM6TXiG4B7szUQSN64Q
518
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OyUuwb+PMhrPFt//h/kIjA
489
519
490
520
491
# You can replace this text with custom content, and it will be preserved on regeneration
521
# You can replace this text with custom code or comments, and it will be preserved on regeneration
492
1;
522
1;
(-)a/Koha/Schema/Result/Deleteditem.pm (+11 lines)
Lines 383-388 __PACKAGE__->set_primary_key("itemnumber"); Link Here
383
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-12-23 16:39:42
383
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-12-23 16:39:42
384
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ji1W0q5g5xTw1J89cjVlWw
384
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ji1W0q5g5xTw1J89cjVlWw
385
385
386
__PACKAGE__->belongs_to(
387
  "biblio",
388
  "Koha::Schema::Result::Biblio",
389
  { biblionumber => "biblionumber" }
390
);
391
392
__PACKAGE__->belongs_to(
393
  "deleted_biblio",
394
  "Koha::Schema::Result::Deletedbiblio",
395
  { biblionumber => "biblionumber" }
396
);
386
397
387
# You can replace this text with custom content, and it will be preserved on regeneration
398
# You can replace this text with custom content, and it will be preserved on regeneration
388
1;
399
1;
(-)a/Koha/Schema/Result/Issue.pm (-6 / +31 lines)
Lines 23-28 __PACKAGE__->table("issues"); Link Here
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
26
=head2 issue_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
26
=head2 borrowernumber
32
=head2 borrowernumber
27
33
28
  data_type: 'integer'
34
  data_type: 'integer'
Lines 92-97 __PACKAGE__->table("issues"); Link Here
92
=cut
98
=cut
93
99
94
__PACKAGE__->add_columns(
100
__PACKAGE__->add_columns(
101
  "issue_id",
102
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
95
  "borrowernumber",
103
  "borrowernumber",
96
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
104
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97
  "itemnumber",
105
  "itemnumber",
Lines 137-142 __PACKAGE__->add_columns( Link Here
137
  },
145
  },
138
);
146
);
139
147
148
=head1 PRIMARY KEY
149
150
=over 4
151
152
=item * L</issue_id>
153
154
=back
155
156
=cut
157
158
__PACKAGE__->set_primary_key("issue_id");
159
140
=head1 RELATIONS
160
=head1 RELATIONS
141
161
142
=head2 borrowernumber
162
=head2 borrowernumber
Lines 180-193 __PACKAGE__->belongs_to( Link Here
180
);
200
);
181
201
182
202
183
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55
203
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:04:34
184
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2SJJ3az4Ml9hKEQvNH3+Kw
204
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ddxYPJTRpfjZi3vGAmGTHQ
185
205
186
__PACKAGE__->belongs_to(
206
__PACKAGE__->belongs_to(
187
    "borrower",
207
  "borrower",
188
    "Koha::Schema::Result::Borrower",
208
  "Koha::Schema::Result::Borrower",
189
    { borrowernumber => "borrowernumber" },
209
  { borrowernumber => "borrowernumber" },
190
    { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" },
210
  {
211
    is_deferrable => 1,
212
    join_type     => "LEFT",
213
    on_delete     => "RESTRICT",
214
    on_update     => "CASCADE",
215
  },
191
);
216
);
192
217
193
__PACKAGE__->belongs_to(
218
__PACKAGE__->belongs_to(
(-)a/Koha/Schema/Result/Item.pm (-17 / +2 lines)
Lines 403-423 __PACKAGE__->add_unique_constraint("itembarcodeidx", ["barcode"]); Link Here
403
403
404
=head1 RELATIONS
404
=head1 RELATIONS
405
405
406
=head2 accountlines
407
408
Type: has_many
409
410
Related object: L<Koha::Schema::Result::Accountline>
411
412
=cut
413
414
__PACKAGE__->has_many(
415
  "accountlines",
416
  "Koha::Schema::Result::Accountline",
417
  { "foreign.itemnumber" => "self.itemnumber" },
418
  { cascade_copy => 0, cascade_delete => 0 },
419
);
420
421
=head2 biblioitemnumber
406
=head2 biblioitemnumber
422
407
423
Type: belongs_to
408
Type: belongs_to
Lines 609-616 __PACKAGE__->might_have( Link Here
609
);
594
);
610
595
611
596
612
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55
597
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 09:35:15
613
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rc89LTrsDtt8Y6yXVUdhMA
598
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bMp3BulwBjowVB0NYJWvEQ
614
599
615
__PACKAGE__->belongs_to(
600
__PACKAGE__->belongs_to(
616
    "biblio",
601
    "biblio",
(-)a/Koha/Schema/Result/OldIssue.pm (-4 / +49 lines)
Lines 23-28 __PACKAGE__->table("old_issues"); Link Here
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
26
=head2 issue_id
27
28
  data_type: 'integer'
29
  is_auto_increment: 1
30
  is_nullable: 0
31
26
=head2 borrowernumber
32
=head2 borrowernumber
27
33
28
  data_type: 'integer'
34
  data_type: 'integer'
Lines 92-97 __PACKAGE__->table("old_issues"); Link Here
92
=cut
98
=cut
93
99
94
__PACKAGE__->add_columns(
100
__PACKAGE__->add_columns(
101
  "issue_id",
102
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
95
  "borrowernumber",
103
  "borrowernumber",
96
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
104
  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
97
  "itemnumber",
105
  "itemnumber",
Lines 137-142 __PACKAGE__->add_columns( Link Here
137
  },
145
  },
138
);
146
);
139
147
148
=head1 PRIMARY KEY
149
150
=over 4
151
152
=item * L</issue_id>
153
154
=back
155
156
=cut
157
158
__PACKAGE__->set_primary_key("issue_id");
159
140
=head1 RELATIONS
160
=head1 RELATIONS
141
161
142
=head2 borrowernumber
162
=head2 borrowernumber
Lines 180-188 __PACKAGE__->belongs_to( Link Here
180
);
200
);
181
201
182
202
183
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55
203
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2014-07-15 10:04:34
184
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sgsDHihVYHrTycbaqoGbaQ
204
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bVARhs8ny3Tj+mNTUMb8oA
205
206
__PACKAGE__->belongs_to(
207
  "borrower",
208
  "Koha::Schema::Result::Borrower",
209
  { borrowernumber => "borrowernumber" },
210
  { join_type => "LEFT" },
211
);
212
213
__PACKAGE__->belongs_to(
214
  "item",
215
  "Koha::Schema::Result::Item",
216
  { itemnumber => "itemnumber" },
217
  { join_type => "LEFT" },
218
);
219
220
__PACKAGE__->belongs_to(
221
  "deletedborrower",
222
  "Koha::Schema::Result::Deletedborrower",
223
  { borrowernumber => "borrowernumber" },
224
  { join_type => "LEFT" },
225
);
185
226
227
__PACKAGE__->belongs_to(
228
  "deleteditem",
229
  "Koha::Schema::Result::Deleteditem",
230
  { itemnumber => "itemnumber" },
231
  { join_type => "LEFT" },
232
);
186
233
187
# You can replace this text with custom content, and it will be preserved on regeneration
188
1;
234
1;
189
- 

Return to bug 6427