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

(-)a/Koha/Account/Line.pm (+58 lines)
Lines 762-767 sub to_api_mapping { Link Here
762
    };
762
    };
763
}
763
}
764
764
765
=head3 store
766
767
Specific store method to generate credit number before saving
768
769
=cut
770
771
sub store {
772
    my ($self) = @_;
773
774
    my $AutoCreditNumber = C4::Context->preference('AutoCreditNumber');
775
    if ($AutoCreditNumber && !$self->in_storage && $self->is_credit && !$self->credit_number) {
776
        my $rs = Koha::Database->new->schema->resultset($self->_type);
777
778
        if ($AutoCreditNumber eq 'incremental') {
779
            my $max = $rs->search({
780
                credit_number => { -regexp => '^[0-9]+$' }
781
            }, {
782
                select => \'CAST(credit_number AS UNSIGNED)',
783
                as => ['credit_number'],
784
            })->get_column('credit_number')->max;
785
            $max //= 0;
786
            $self->credit_number($max + 1);
787
        } elsif ($AutoCreditNumber eq 'annual') {
788
            my $now = DateTime->now;
789
            my $prefix = sprintf('%d-', $now->year);
790
            my $max = $rs->search({
791
                -and => [
792
                    credit_number => { -regexp => '[0-9]{4}$' },
793
                    credit_number => { -like => "$prefix%" },
794
                ],
795
            })->get_column('credit_number')->max;
796
            $max //= $prefix . '0000';
797
            my $incr = substr($max, length $prefix);
798
            $self->credit_number(sprintf('%s%04d', $prefix, $incr + 1));
799
        } elsif ($AutoCreditNumber eq 'branchyyyymmincr') {
800
            my $userenv = C4::Context->userenv;
801
            if ($userenv) {
802
                my $branch = $userenv->{branch};
803
                my $now = DateTime->now;
804
                my $prefix = sprintf('%s%d%02d', $branch, $now->year, $now->month);
805
                my $pattern = $prefix;
806
                $pattern =~ s/([\?%_])/\\$1/g;
807
                my $max = $rs->search({
808
                    -and => [
809
                        credit_number => { -regexp => '[0-9]{4}$' },
810
                        credit_number => { -like => "$pattern%" },
811
                    ],
812
                })->get_column('credit_number')->max;
813
                $max //= $prefix . '0000';
814
                my $incr = substr($max, length $prefix);
815
                $self->credit_number(sprintf('%s%04d', $prefix, $incr + 1));
816
            }
817
        }
818
    }
819
820
    return $self->SUPER::store();
821
}
822
765
=head2 Internal methods
823
=head2 Internal methods
766
824
767
=cut
825
=cut
(-)a/Koha/Schema/Result/AccountCreditType.pm (-2 / +10 lines)
Lines 47-52 __PACKAGE__->table("account_credit_types"); Link Here
47
  default_value: 0
47
  default_value: 0
48
  is_nullable: 0
48
  is_nullable: 0
49
49
50
=head2 archived
51
52
  data_type: 'tinyint'
53
  default_value: 0
54
  is_nullable: 0
55
50
=cut
56
=cut
51
57
52
__PACKAGE__->add_columns(
58
__PACKAGE__->add_columns(
Lines 58-63 __PACKAGE__->add_columns( Link Here
58
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
64
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
59
  "is_system",
65
  "is_system",
60
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
66
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
67
  "archived",
68
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
61
);
69
);
62
70
63
=head1 PRIMARY KEY
71
=head1 PRIMARY KEY
Lines 105-112 __PACKAGE__->has_many( Link Here
105
);
113
);
106
114
107
115
108
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52
116
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
109
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uycu/23b681kWHNX+/gNiw
117
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9tQSTkjAGqGikbWnbBhlgw
110
118
111
__PACKAGE__->add_columns(
119
__PACKAGE__->add_columns(
112
    '+is_system' => { is_boolean => 1 }
120
    '+is_system' => { is_boolean => 1 }
(-)a/Koha/Schema/Result/AccountDebitType.pm (-4 / +4 lines)
Lines 45-51 __PACKAGE__->table("account_debit_types"); Link Here
45
45
46
  data_type: 'tinyint'
46
  data_type: 'tinyint'
47
  default_value: 0
47
  default_value: 0
48
  is_nullable: 0
48
  is_nullable: 1
49
49
50
=head2 default_amount
50
=head2 default_amount
51
51
Lines 75-81 __PACKAGE__->add_columns( Link Here
75
  "can_be_invoiced",
75
  "can_be_invoiced",
76
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
76
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
77
  "can_be_sold",
77
  "can_be_sold",
78
  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
78
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
79
  "default_amount",
79
  "default_amount",
80
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
80
  { data_type => "decimal", is_nullable => 1, size => [28, 6] },
81
  "is_system",
81
  "is_system",
Lines 129-136 __PACKAGE__->has_many( Link Here
129
);
129
);
130
130
131
131
132
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-17 12:22:04
132
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
133
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8FIMJZ+JAmqa+Dx7oymBjw
133
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qZfg9L2ysl2pJUiaBLwUFg
134
134
135
__PACKAGE__->add_columns(
135
__PACKAGE__->add_columns(
136
    '+is_system' => { is_boolean => 1 }
136
    '+is_system' => { is_boolean => 1 }
(-)a/Koha/Schema/Result/AccountOffset.pm (-4 / +4 lines)
Lines 58-64 __PACKAGE__->table("account_offsets"); Link Here
58
58
59
  data_type: 'timestamp'
59
  data_type: 'timestamp'
60
  datetime_undef_if_invalid: 1
60
  datetime_undef_if_invalid: 1
61
  default_value: current_timestamp
61
  default_value: 'current_timestamp()'
62
  is_nullable: 0
62
  is_nullable: 0
63
63
64
=cut
64
=cut
Lines 78-84 __PACKAGE__->add_columns( Link Here
78
  {
78
  {
79
    data_type => "timestamp",
79
    data_type => "timestamp",
80
    datetime_undef_if_invalid => 1,
80
    datetime_undef_if_invalid => 1,
81
    default_value => \"current_timestamp",
81
    default_value => "current_timestamp()",
82
    is_nullable => 0,
82
    is_nullable => 0,
83
  },
83
  },
84
);
84
);
Lines 153-160 __PACKAGE__->belongs_to( Link Here
153
);
153
);
154
154
155
155
156
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-20 16:27:04
156
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
157
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tPPrIug2c7PbDO7LCxCJAA
157
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mfS1B79dpfPc8VGdjT1+YA
158
158
159
sub koha_object_class {
159
sub koha_object_class {
160
    'Koha::Account::Offset';
160
    'Koha::Account::Offset';
(-)a/Koha/Schema/Result/Accountline.pm (-4 / +14 lines)
Lines 77-82 __PACKAGE__->table("accountlines"); Link Here
77
  is_nullable: 1
77
  is_nullable: 1
78
  size: 80
78
  size: 80
79
79
80
=head2 credit_number
81
82
  data_type: 'varchar'
83
  is_nullable: 1
84
  size: 20
85
86
autogenerated number for credits
87
80
=head2 status
88
=head2 status
81
89
82
  data_type: 'varchar'
90
  data_type: 'varchar'
Lines 99-105 __PACKAGE__->table("accountlines"); Link Here
99
107
100
  data_type: 'timestamp'
108
  data_type: 'timestamp'
101
  datetime_undef_if_invalid: 1
109
  datetime_undef_if_invalid: 1
102
  default_value: current_timestamp
110
  default_value: 'current_timestamp()'
103
  is_nullable: 0
111
  is_nullable: 0
104
112
105
=head2 note
113
=head2 note
Lines 153-158 __PACKAGE__->add_columns( Link Here
153
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
161
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
154
  "debit_type_code",
162
  "debit_type_code",
155
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
163
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 },
164
  "credit_number",
165
  { data_type => "varchar", is_nullable => 1, size => 20 },
156
  "status",
166
  "status",
157
  { data_type => "varchar", is_nullable => 1, size => 16 },
167
  { data_type => "varchar", is_nullable => 1, size => 16 },
158
  "payment_type",
168
  "payment_type",
Lines 163-169 __PACKAGE__->add_columns( Link Here
163
  {
173
  {
164
    data_type => "timestamp",
174
    data_type => "timestamp",
165
    datetime_undef_if_invalid => 1,
175
    datetime_undef_if_invalid => 1,
166
    default_value => \"current_timestamp",
176
    default_value => "current_timestamp()",
167
    is_nullable => 0,
177
    is_nullable => 0,
168
  },
178
  },
169
  "note",
179
  "note",
Lines 363-370 __PACKAGE__->belongs_to( Link Here
363
);
373
);
364
374
365
375
366
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-24 16:33:42
376
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
367
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q4Ahb8xIxAsjT/aF9yjrdQ
377
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uFM5Kclu6Vw6ui+1A/RXsQ
368
378
369
sub koha_objects_class {
379
sub koha_objects_class {
370
    'Koha::Account::Lines';
380
    'Koha::Account::Lines';
(-)a/Koha/Schema/Result/ActionLog.pm (-4 / +4 lines)
Lines 33-39 __PACKAGE__->table("action_logs"); Link Here
33
33
34
  data_type: 'timestamp'
34
  data_type: 'timestamp'
35
  datetime_undef_if_invalid: 1
35
  datetime_undef_if_invalid: 1
36
  default_value: current_timestamp
36
  default_value: 'current_timestamp()'
37
  is_nullable: 0
37
  is_nullable: 0
38
38
39
=head2 user
39
=head2 user
Lines 77-83 __PACKAGE__->add_columns( Link Here
77
  {
77
  {
78
    data_type => "timestamp",
78
    data_type => "timestamp",
79
    datetime_undef_if_invalid => 1,
79
    datetime_undef_if_invalid => 1,
80
    default_value => \"current_timestamp",
80
    default_value => "current_timestamp()",
81
    is_nullable => 0,
81
    is_nullable => 0,
82
  },
82
  },
83
  "user",
83
  "user",
Lines 107-114 __PACKAGE__->add_columns( Link Here
107
__PACKAGE__->set_primary_key("action_id");
107
__PACKAGE__->set_primary_key("action_id");
108
108
109
109
110
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
110
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
111
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VVXBchLYkj+S+lLhl7bKgw
111
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TmMQtaJ4596Tj8mYKvZffA
112
112
113
113
114
# You can replace this text with custom code or comments, and it will be preserved on regeneration
114
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Aqbudget.pm (-4 / +4 lines)
Lines 82-88 __PACKAGE__->table("aqbudgets"); Link Here
82
82
83
  data_type: 'timestamp'
83
  data_type: 'timestamp'
84
  datetime_undef_if_invalid: 1
84
  datetime_undef_if_invalid: 1
85
  default_value: current_timestamp
85
  default_value: 'current_timestamp()'
86
  is_nullable: 0
86
  is_nullable: 0
87
87
88
=head2 budget_period_id
88
=head2 budget_period_id
Lines 153-159 __PACKAGE__->add_columns( Link Here
153
  {
153
  {
154
    data_type => "timestamp",
154
    data_type => "timestamp",
155
    datetime_undef_if_invalid => 1,
155
    datetime_undef_if_invalid => 1,
156
    default_value => \"current_timestamp",
156
    default_value => "current_timestamp()",
157
    is_nullable => 0,
157
    is_nullable => 0,
158
  },
158
  },
159
  "budget_period_id",
159
  "budget_period_id",
Lines 298-305 Composing rels: L</aqbudgetborrowers> -> borrowernumber Link Here
298
__PACKAGE__->many_to_many("borrowernumbers", "aqbudgetborrowers", "borrowernumber");
298
__PACKAGE__->many_to_many("borrowernumbers", "aqbudgetborrowers", "borrowernumber");
299
299
300
300
301
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-16 13:50:45
301
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
302
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zB7ox8a4KdDGq5fsbQfLGQ
302
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wbXfOXiR6q7jVleJyzsLWQ
303
303
304
304
305
sub koha_object_class {
305
sub koha_object_class {
(-)a/Koha/Schema/Result/AqinvoiceAdjustment.pm (-4 / +4 lines)
Lines 68-74 __PACKAGE__->table("aqinvoice_adjustments"); Link Here
68
68
69
  data_type: 'timestamp'
69
  data_type: 'timestamp'
70
  datetime_undef_if_invalid: 1
70
  datetime_undef_if_invalid: 1
71
  default_value: current_timestamp
71
  default_value: 'current_timestamp()'
72
  is_nullable: 0
72
  is_nullable: 0
73
73
74
=cut
74
=cut
Lines 92-98 __PACKAGE__->add_columns( Link Here
92
  {
92
  {
93
    data_type => "timestamp",
93
    data_type => "timestamp",
94
    datetime_undef_if_invalid => 1,
94
    datetime_undef_if_invalid => 1,
95
    default_value => \"current_timestamp",
95
    default_value => "current_timestamp()",
96
    is_nullable => 0,
96
    is_nullable => 0,
97
  },
97
  },
98
);
98
);
Lines 147-154 __PACKAGE__->belongs_to( Link Here
147
);
147
);
148
148
149
149
150
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-19 17:32:57
150
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
151
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jl0qxkZWVs2D1pi3kaRjpg
151
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:V0/9Hi5Uc9L2AnWcdzDn4g
152
152
153
sub koha_object_class {
153
sub koha_object_class {
154
    'Koha::Acquisition::Invoice::Adjustment';
154
    'Koha::Acquisition::Invoice::Adjustment';
(-)a/Koha/Schema/Result/Aqorder.pm (-4 / +4 lines)
Lines 143-149 __PACKAGE__->table("aqorders"); Link Here
143
143
144
  data_type: 'timestamp'
144
  data_type: 'timestamp'
145
  datetime_undef_if_invalid: 1
145
  datetime_undef_if_invalid: 1
146
  default_value: current_timestamp
146
  default_value: 'current_timestamp()'
147
  is_nullable: 0
147
  is_nullable: 0
148
148
149
=head2 rrp
149
=head2 rrp
Lines 371-377 __PACKAGE__->add_columns( Link Here
371
  {
371
  {
372
    data_type => "timestamp",
372
    data_type => "timestamp",
373
    datetime_undef_if_invalid => 1,
373
    datetime_undef_if_invalid => 1,
374
    default_value => \"current_timestamp",
374
    default_value => "current_timestamp()",
375
    is_nullable => 0,
375
    is_nullable => 0,
376
  },
376
  },
377
  "rrp",
377
  "rrp",
Lines 661-668 Composing rels: L</aqorder_users> -> borrowernumber Link Here
661
__PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber");
661
__PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber");
662
662
663
663
664
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-08-31 11:51:37
664
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
665
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GQEXetlivZm7buQohl8m4A
665
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xXgooImZVlFvUzSJXHPWhQ
666
666
667
__PACKAGE__->belongs_to(
667
__PACKAGE__->belongs_to(
668
  "basket",
668
  "basket",
(-)a/Koha/Schema/Result/AqordersItem.pm (-4 / +4 lines)
Lines 38-44 __PACKAGE__->table("aqorders_items"); Link Here
38
38
39
  data_type: 'timestamp'
39
  data_type: 'timestamp'
40
  datetime_undef_if_invalid: 1
40
  datetime_undef_if_invalid: 1
41
  default_value: current_timestamp
41
  default_value: 'current_timestamp()'
42
  is_nullable: 0
42
  is_nullable: 0
43
43
44
=cut
44
=cut
Lines 52-58 __PACKAGE__->add_columns( Link Here
52
  {
52
  {
53
    data_type => "timestamp",
53
    data_type => "timestamp",
54
    datetime_undef_if_invalid => 1,
54
    datetime_undef_if_invalid => 1,
55
    default_value => \"current_timestamp",
55
    default_value => "current_timestamp()",
56
    is_nullable => 0,
56
    is_nullable => 0,
57
  },
57
  },
58
);
58
);
Lines 87-94 __PACKAGE__->belongs_to( Link Here
87
);
87
);
88
88
89
89
90
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
90
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
91
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hvDuLTY3idYc1ujykNDrPQ
91
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FLVvGzsei1T0NsB5+ubnXw
92
92
93
93
94
# You can replace this text with custom content, and it will be preserved on regeneration
94
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/AqordersTransfer.pm (-4 / +4 lines)
Lines 39-45 __PACKAGE__->table("aqorders_transfers"); Link Here
39
39
40
  data_type: 'timestamp'
40
  data_type: 'timestamp'
41
  datetime_undef_if_invalid: 1
41
  datetime_undef_if_invalid: 1
42
  default_value: current_timestamp
42
  default_value: 'current_timestamp()'
43
  is_nullable: 0
43
  is_nullable: 0
44
44
45
=cut
45
=cut
Lines 53-59 __PACKAGE__->add_columns( Link Here
53
  {
53
  {
54
    data_type => "timestamp",
54
    data_type => "timestamp",
55
    datetime_undef_if_invalid => 1,
55
    datetime_undef_if_invalid => 1,
56
    default_value => \"current_timestamp",
56
    default_value => "current_timestamp()",
57
    is_nullable => 0,
57
    is_nullable => 0,
58
  },
58
  },
59
);
59
);
Lines 127-134 __PACKAGE__->belongs_to( Link Here
127
);
127
);
128
128
129
129
130
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55
130
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
131
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z6+vESlzZKjZloNvrEHpxA
131
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FqlytCU3bCmEDqWkOm2uuw
132
132
133
133
134
# You can replace this text with custom code or comments, and it will be preserved on regeneration
134
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/ArticleRequest.pm (-4 / +4 lines)
Lines 110-116 __PACKAGE__->table("article_requests"); Link Here
110
110
111
  data_type: 'timestamp'
111
  data_type: 'timestamp'
112
  datetime_undef_if_invalid: 1
112
  datetime_undef_if_invalid: 1
113
  default_value: current_timestamp
113
  default_value: 'current_timestamp()'
114
  is_nullable: 0
114
  is_nullable: 0
115
115
116
=head2 updated_on
116
=head2 updated_on
Lines 161-167 __PACKAGE__->add_columns( Link Here
161
  {
161
  {
162
    data_type => "timestamp",
162
    data_type => "timestamp",
163
    datetime_undef_if_invalid => 1,
163
    datetime_undef_if_invalid => 1,
164
    default_value => \"current_timestamp",
164
    default_value => "current_timestamp()",
165
    is_nullable => 0,
165
    is_nullable => 0,
166
  },
166
  },
167
  "updated_on",
167
  "updated_on",
Lines 257-264 __PACKAGE__->belongs_to( Link Here
257
);
257
);
258
258
259
259
260
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
260
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
261
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BOBB3vld8wY75u45YldoEg
261
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DZfgssb5lWBwXAQD4yFX2g
262
262
263
263
264
# You can replace this text with custom code or comments, and it will be preserved on regeneration
264
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/AuthHeader.pm (-4 / +4 lines)
Lines 47-53 __PACKAGE__->table("auth_header"); Link Here
47
47
48
  data_type: 'timestamp'
48
  data_type: 'timestamp'
49
  datetime_undef_if_invalid: 1
49
  datetime_undef_if_invalid: 1
50
  default_value: current_timestamp
50
  default_value: 'current_timestamp()'
51
  is_nullable: 0
51
  is_nullable: 0
52
52
53
=head2 origincode
53
=head2 origincode
Lines 94-100 __PACKAGE__->add_columns( Link Here
94
  {
94
  {
95
    data_type => "timestamp",
95
    data_type => "timestamp",
96
    datetime_undef_if_invalid => 1,
96
    datetime_undef_if_invalid => 1,
97
    default_value => \"current_timestamp",
97
    default_value => "current_timestamp()",
98
    is_nullable => 0,
98
    is_nullable => 0,
99
  },
99
  },
100
  "origincode",
100
  "origincode",
Lines 122-129 __PACKAGE__->add_columns( Link Here
122
__PACKAGE__->set_primary_key("authid");
122
__PACKAGE__->set_primary_key("authid");
123
123
124
124
125
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
125
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
126
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kHEdfMFYFtn3sQ20qsdFyg
126
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:78YWjMUi8plOllaNMWzmuw
127
127
128
sub koha_object_class {
128
sub koha_object_class {
129
    'Koha::Authority';
129
    'Koha::Authority';
(-)a/Koha/Schema/Result/Biblio.pm (-4 / +19 lines)
Lines 95-101 __PACKAGE__->table("biblio"); Link Here
95
95
96
  data_type: 'timestamp'
96
  data_type: 'timestamp'
97
  datetime_undef_if_invalid: 1
97
  datetime_undef_if_invalid: 1
98
  default_value: current_timestamp
98
  default_value: 'current_timestamp()'
99
  is_nullable: 0
99
  is_nullable: 0
100
100
101
=head2 datecreated
101
=head2 datecreated
Lines 142-148 __PACKAGE__->add_columns( Link Here
142
  {
142
  {
143
    data_type => "timestamp",
143
    data_type => "timestamp",
144
    datetime_undef_if_invalid => 1,
144
    datetime_undef_if_invalid => 1,
145
    default_value => \"current_timestamp",
145
    default_value => "current_timestamp()",
146
    is_nullable => 0,
146
    is_nullable => 0,
147
  },
147
  },
148
  "datecreated",
148
  "datecreated",
Lines 285-290 __PACKAGE__->has_many( Link Here
285
  { cascade_copy => 0, cascade_delete => 0 },
285
  { cascade_copy => 0, cascade_delete => 0 },
286
);
286
);
287
287
288
=head2 items_bundle
289
290
Type: might_have
291
292
Related object: L<Koha::Schema::Result::ItemsBundle>
293
294
=cut
295
296
__PACKAGE__->might_have(
297
  "items_bundle",
298
  "Koha::Schema::Result::ItemsBundle",
299
  { "foreign.biblionumber" => "self.biblionumber" },
300
  { cascade_copy => 0, cascade_delete => 0 },
301
);
302
288
=head2 old_reserves
303
=head2 old_reserves
289
304
290
Type: has_many
305
Type: has_many
Lines 406-413 __PACKAGE__->has_many( Link Here
406
);
421
);
407
422
408
423
409
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47
424
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
410
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:otCex8qzJmZyc+JXpKNdpQ
425
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:swuobxQgc+thlB/K+3QZeA
411
426
412
427
413
__PACKAGE__->has_one(
428
__PACKAGE__->has_one(
(-)a/Koha/Schema/Result/BiblioMetadata.pm (-4 / +4 lines)
Lines 56-62 __PACKAGE__->table("biblio_metadata"); Link Here
56
56
57
  data_type: 'timestamp'
57
  data_type: 'timestamp'
58
  datetime_undef_if_invalid: 1
58
  datetime_undef_if_invalid: 1
59
  default_value: current_timestamp
59
  default_value: 'current_timestamp()'
60
  is_nullable: 0
60
  is_nullable: 0
61
61
62
=cut
62
=cut
Lines 76-82 __PACKAGE__->add_columns( Link Here
76
  {
76
  {
77
    data_type => "timestamp",
77
    data_type => "timestamp",
78
    datetime_undef_if_invalid => 1,
78
    datetime_undef_if_invalid => 1,
79
    default_value => \"current_timestamp",
79
    default_value => "current_timestamp()",
80
    is_nullable => 0,
80
    is_nullable => 0,
81
  },
81
  },
82
);
82
);
Lines 132-139 __PACKAGE__->belongs_to( Link Here
132
);
132
);
133
133
134
134
135
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-30 11:34:16
135
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
136
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJk/YOw8Y/QRmmPPL3G5qQ
136
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5mMqx4y01pZfu8YrNvXDTQ
137
137
138
sub koha_object_class {
138
sub koha_object_class {
139
    'Koha::Biblio::Metadata';
139
    'Koha::Biblio::Metadata';
(-)a/Koha/Schema/Result/Biblioitem.pm (-4 / +4 lines)
Lines 118-124 __PACKAGE__->table("biblioitems"); Link Here
118
118
119
  data_type: 'timestamp'
119
  data_type: 'timestamp'
120
  datetime_undef_if_invalid: 1
120
  datetime_undef_if_invalid: 1
121
  default_value: current_timestamp
121
  default_value: 'current_timestamp()'
122
  is_nullable: 0
122
  is_nullable: 0
123
123
124
=head2 illus
124
=head2 illus
Lines 248-254 __PACKAGE__->add_columns( Link Here
248
  {
248
  {
249
    data_type => "timestamp",
249
    data_type => "timestamp",
250
    datetime_undef_if_invalid => 1,
250
    datetime_undef_if_invalid => 1,
251
    default_value => \"current_timestamp",
251
    default_value => "current_timestamp()",
252
    is_nullable => 0,
252
    is_nullable => 0,
253
  },
253
  },
254
  "illus",
254
  "illus",
Lines 326-333 __PACKAGE__->has_many( Link Here
326
);
326
);
327
327
328
328
329
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
329
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
330
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ogVRTKNaUQSI3BE2xC2lww
330
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Anhy+pvrQlPufkbe5qsJsQ
331
331
332
__PACKAGE__->belongs_to( biblio => "Koha::Schema::Result::Biblio", "biblionumber" );
332
__PACKAGE__->belongs_to( biblio => "Koha::Schema::Result::Biblio", "biblionumber" );
333
333
(-)a/Koha/Schema/Result/Borrower.pm (-8 / +8 lines)
Lines 425-431 __PACKAGE__->table("borrowers"); Link Here
425
425
426
  data_type: 'timestamp'
426
  data_type: 'timestamp'
427
  datetime_undef_if_invalid: 1
427
  datetime_undef_if_invalid: 1
428
  default_value: current_timestamp
428
  default_value: 'current_timestamp()'
429
  is_nullable: 0
429
  is_nullable: 0
430
430
431
=head2 lastseen
431
=head2 lastseen
Lines 640-646 __PACKAGE__->add_columns( Link Here
640
  {
640
  {
641
    data_type => "timestamp",
641
    data_type => "timestamp",
642
    datetime_undef_if_invalid => 1,
642
    datetime_undef_if_invalid => 1,
643
    default_value => \"current_timestamp",
643
    default_value => "current_timestamp()",
644
    is_nullable => 0,
644
    is_nullable => 0,
645
  },
645
  },
646
  "lastseen",
646
  "lastseen",
Lines 1429-1445 __PACKAGE__->belongs_to( Link Here
1429
  },
1429
  },
1430
);
1430
);
1431
1431
1432
=head2 subscriptionroutinglists
1432
=head2 subscriptionroutings
1433
1433
1434
Type: has_many
1434
Type: has_many
1435
1435
1436
Related object: L<Koha::Schema::Result::Subscriptionroutinglist>
1436
Related object: L<Koha::Schema::Result::Subscriptionrouting>
1437
1437
1438
=cut
1438
=cut
1439
1439
1440
__PACKAGE__->has_many(
1440
__PACKAGE__->has_many(
1441
  "subscriptionroutinglists",
1441
  "subscriptionroutings",
1442
  "Koha::Schema::Result::Subscriptionroutinglist",
1442
  "Koha::Schema::Result::Subscriptionrouting",
1443
  { "foreign.borrowernumber" => "self.borrowernumber" },
1443
  { "foreign.borrowernumber" => "self.borrowernumber" },
1444
  { cascade_copy => 0, cascade_delete => 0 },
1444
  { cascade_copy => 0, cascade_delete => 0 },
1445
);
1445
);
Lines 1635-1642 Composing rels: L</aqorder_users> -> ordernumber Link Here
1635
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1635
__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
1636
1636
1637
1637
1638
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-10 14:31:00
1638
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
1639
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GjJLIOViIFRm185Yjl9vYA
1639
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9Ekh2ybmnaY+m5FxB7U6mQ
1640
1640
1641
__PACKAGE__->add_columns(
1641
__PACKAGE__->add_columns(
1642
    '+anonymized'    => { is_boolean => 1 },
1642
    '+anonymized'    => { is_boolean => 1 },
(-)a/Koha/Schema/Result/BorrowerDebarment.pm (-4 / +4 lines)
Lines 62-68 __PACKAGE__->table("borrower_debarments"); Link Here
62
62
63
  data_type: 'timestamp'
63
  data_type: 'timestamp'
64
  datetime_undef_if_invalid: 1
64
  datetime_undef_if_invalid: 1
65
  default_value: current_timestamp
65
  default_value: 'current_timestamp()'
66
  is_nullable: 0
66
  is_nullable: 0
67
67
68
=head2 updated
68
=head2 updated
Lines 95-101 __PACKAGE__->add_columns( Link Here
95
  {
95
  {
96
    data_type => "timestamp",
96
    data_type => "timestamp",
97
    datetime_undef_if_invalid => 1,
97
    datetime_undef_if_invalid => 1,
98
    default_value => \"current_timestamp",
98
    default_value => "current_timestamp()",
99
    is_nullable => 0,
99
    is_nullable => 0,
100
  },
100
  },
101
  "updated",
101
  "updated",
Lines 136-143 __PACKAGE__->belongs_to( Link Here
136
);
136
);
137
137
138
138
139
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
139
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
140
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:J9J1ReRLqhVasOQXvde2Uw
140
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tOAoFYn0a6MZgtvoFS15xQ
141
141
142
142
143
# You can replace this text with custom code or comments, and it will be preserved on regeneration
143
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/BorrowerFile.pm (-4 / +4 lines)
Lines 62-68 __PACKAGE__->table("borrower_files"); Link Here
62
62
63
  data_type: 'timestamp'
63
  data_type: 'timestamp'
64
  datetime_undef_if_invalid: 1
64
  datetime_undef_if_invalid: 1
65
  default_value: current_timestamp
65
  default_value: 'current_timestamp()'
66
  is_nullable: 0
66
  is_nullable: 0
67
67
68
=cut
68
=cut
Lines 84-90 __PACKAGE__->add_columns( Link Here
84
  {
84
  {
85
    data_type => "timestamp",
85
    data_type => "timestamp",
86
    datetime_undef_if_invalid => 1,
86
    datetime_undef_if_invalid => 1,
87
    default_value => \"current_timestamp",
87
    default_value => "current_timestamp()",
88
    is_nullable => 0,
88
    is_nullable => 0,
89
  },
89
  },
90
);
90
);
Lines 119-126 __PACKAGE__->belongs_to( Link Here
119
);
119
);
120
120
121
121
122
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
122
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
123
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sbkf7bvdO4CgmiBLgIwYQg
123
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CRCwGgDaSvO7nc4Nkyb3Cw
124
124
125
125
126
# You can replace this text with custom content, and it will be preserved on regeneration
126
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/BorrowerModification.pm (-4 / +4 lines)
Lines 27-33 __PACKAGE__->table("borrower_modifications"); Link Here
27
27
28
  data_type: 'timestamp'
28
  data_type: 'timestamp'
29
  datetime_undef_if_invalid: 1
29
  datetime_undef_if_invalid: 1
30
  default_value: current_timestamp
30
  default_value: 'current_timestamp()'
31
  is_nullable: 0
31
  is_nullable: 0
32
32
33
=head2 verification_token
33
=head2 verification_token
Lines 428-434 __PACKAGE__->add_columns( Link Here
428
  {
428
  {
429
    data_type => "timestamp",
429
    data_type => "timestamp",
430
    datetime_undef_if_invalid => 1,
430
    datetime_undef_if_invalid => 1,
431
    default_value => \"current_timestamp",
431
    default_value => "current_timestamp()",
432
    is_nullable => 0,
432
    is_nullable => 0,
433
  },
433
  },
434
  "verification_token",
434
  "verification_token",
Lines 610-617 __PACKAGE__->add_columns( Link Here
610
__PACKAGE__->set_primary_key("verification_token", "borrowernumber");
610
__PACKAGE__->set_primary_key("verification_token", "borrowernumber");
611
611
612
612
613
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-22 16:54:42
613
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
614
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jkZUTN+mGIdp8ySV0BYNTw
614
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kwyyiaDxYxdTaYEdcEX8yg
615
615
616
sub koha_object_class {
616
sub koha_object_class {
617
    'Koha::Patron::Modification';
617
    'Koha::Patron::Modification';
(-)a/Koha/Schema/Result/BorrowerPasswordRecovery.pm (-4 / +4 lines)
Lines 38-44 __PACKAGE__->table("borrower_password_recovery"); Link Here
38
38
39
  data_type: 'timestamp'
39
  data_type: 'timestamp'
40
  datetime_undef_if_invalid: 1
40
  datetime_undef_if_invalid: 1
41
  default_value: current_timestamp
41
  default_value: 'current_timestamp()'
42
  is_nullable: 0
42
  is_nullable: 0
43
43
44
=cut
44
=cut
Lines 52-58 __PACKAGE__->add_columns( Link Here
52
  {
52
  {
53
    data_type => "timestamp",
53
    data_type => "timestamp",
54
    datetime_undef_if_invalid => 1,
54
    datetime_undef_if_invalid => 1,
55
    default_value => \"current_timestamp",
55
    default_value => "current_timestamp()",
56
    is_nullable => 0,
56
    is_nullable => 0,
57
  },
57
  },
58
);
58
);
Lines 70-77 __PACKAGE__->add_columns( Link Here
70
__PACKAGE__->set_primary_key("borrowernumber");
70
__PACKAGE__->set_primary_key("borrowernumber");
71
71
72
72
73
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2016-01-22 10:16:52
73
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
74
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c4ehAGqOD6YHpGg85BX8YQ
74
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rQvacObXzIDRx+cnDgX6uA
75
75
76
76
77
# You can replace this text with custom code or comments, and it will be preserved on regeneration
77
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Club.pm (-4 / +4 lines)
Lines 68-74 __PACKAGE__->table("clubs"); Link Here
68
68
69
  data_type: 'timestamp'
69
  data_type: 'timestamp'
70
  datetime_undef_if_invalid: 1
70
  datetime_undef_if_invalid: 1
71
  default_value: current_timestamp
71
  default_value: 'current_timestamp()'
72
  is_nullable: 0
72
  is_nullable: 0
73
73
74
=head2 date_updated
74
=head2 date_updated
Lines 98-104 __PACKAGE__->add_columns( Link Here
98
  {
98
  {
99
    data_type => "timestamp",
99
    data_type => "timestamp",
100
    datetime_undef_if_invalid => 1,
100
    datetime_undef_if_invalid => 1,
101
    default_value => \"current_timestamp",
101
    default_value => "current_timestamp()",
102
    is_nullable => 0,
102
    is_nullable => 0,
103
  },
103
  },
104
  "date_updated",
104
  "date_updated",
Lines 204-211 __PACKAGE__->belongs_to( Link Here
204
);
204
);
205
205
206
206
207
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47
207
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
208
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WbB7PSSU4xaszsKe9Eacqw
208
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q0tsXoANaJ0laHSyzhvWBg
209
209
210
210
211
# You can replace this text with custom content, and it will be preserved on regeneration
211
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/ClubEnrollment.pm (-4 / +4 lines)
Lines 45-51 __PACKAGE__->table("club_enrollments"); Link Here
45
45
46
  data_type: 'timestamp'
46
  data_type: 'timestamp'
47
  datetime_undef_if_invalid: 1
47
  datetime_undef_if_invalid: 1
48
  default_value: current_timestamp
48
  default_value: 'current_timestamp()'
49
  is_nullable: 0
49
  is_nullable: 0
50
50
51
=head2 date_canceled
51
=head2 date_canceled
Lines 86-92 __PACKAGE__->add_columns( Link Here
86
  {
86
  {
87
    data_type => "timestamp",
87
    data_type => "timestamp",
88
    datetime_undef_if_invalid => 1,
88
    datetime_undef_if_invalid => 1,
89
    default_value => \"current_timestamp",
89
    default_value => "current_timestamp()",
90
    is_nullable => 0,
90
    is_nullable => 0,
91
  },
91
  },
92
  "date_canceled",
92
  "date_canceled",
Lines 191-198 __PACKAGE__->has_many( Link Here
191
);
191
);
192
192
193
193
194
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-12 17:59:47
194
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
195
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ih/HQM4KIRDZ0ESXVR9FwA
195
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BGc4RqbBSCR6uniY1/ra4Q
196
196
197
sub koha_object_class {
197
sub koha_object_class {
198
    'Koha::Club::Enrollment';
198
    'Koha::Club::Enrollment';
(-)a/Koha/Schema/Result/ClubHold.pm (-4 / +4 lines)
Lines 51-57 __PACKAGE__->table("club_holds"); Link Here
51
51
52
  data_type: 'timestamp'
52
  data_type: 'timestamp'
53
  datetime_undef_if_invalid: 1
53
  datetime_undef_if_invalid: 1
54
  default_value: current_timestamp
54
  default_value: 'current_timestamp()'
55
  is_nullable: 0
55
  is_nullable: 0
56
56
57
=cut
57
=cut
Lines 69-75 __PACKAGE__->add_columns( Link Here
69
  {
69
  {
70
    data_type => "timestamp",
70
    data_type => "timestamp",
71
    datetime_undef_if_invalid => 1,
71
    datetime_undef_if_invalid => 1,
72
    default_value => \"current_timestamp",
72
    default_value => "current_timestamp()",
73
    is_nullable => 0,
73
    is_nullable => 0,
74
  },
74
  },
75
);
75
);
Lines 154-161 __PACKAGE__->belongs_to( Link Here
154
);
154
);
155
155
156
156
157
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47
157
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
158
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FYGXVx1P2R+dGbeP1xshPA
158
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ccFlKbTvIRs4u01E8qqnRg
159
159
160
sub koha_objects_class {
160
sub koha_objects_class {
161
    'Koha::Club::Holds';
161
    'Koha::Club::Holds';
(-)a/Koha/Schema/Result/ClubTemplate.pm (-4 / +4 lines)
Lines 62-68 __PACKAGE__->table("club_templates"); Link Here
62
62
63
  data_type: 'timestamp'
63
  data_type: 'timestamp'
64
  datetime_undef_if_invalid: 1
64
  datetime_undef_if_invalid: 1
65
  default_value: current_timestamp
65
  default_value: 'current_timestamp()'
66
  is_nullable: 0
66
  is_nullable: 0
67
67
68
=head2 date_updated
68
=head2 date_updated
Lines 96-102 __PACKAGE__->add_columns( Link Here
96
  {
96
  {
97
    data_type => "timestamp",
97
    data_type => "timestamp",
98
    datetime_undef_if_invalid => 1,
98
    datetime_undef_if_invalid => 1,
99
    default_value => \"current_timestamp",
99
    default_value => "current_timestamp()",
100
    is_nullable => 0,
100
    is_nullable => 0,
101
  },
101
  },
102
  "date_updated",
102
  "date_updated",
Lines 189-196 __PACKAGE__->has_many( Link Here
189
);
189
);
190
190
191
191
192
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
192
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
193
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1UuejI9kkTb9eeNKvSLAQQ
193
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YUzYhnCe19rp6VL0cJZQvA
194
194
195
sub koha_object_class {
195
sub koha_object_class {
196
    'Koha::Club::Template';
196
    'Koha::Club::Template';
(-)a/Koha/Schema/Result/Course.pm (-4 / +4 lines)
Lines 86-92 __PACKAGE__->table("courses"); Link Here
86
86
87
  data_type: 'timestamp'
87
  data_type: 'timestamp'
88
  datetime_undef_if_invalid: 1
88
  datetime_undef_if_invalid: 1
89
  default_value: current_timestamp
89
  default_value: 'current_timestamp()'
90
  is_nullable: 0
90
  is_nullable: 0
91
91
92
=cut
92
=cut
Lines 121-127 __PACKAGE__->add_columns( Link Here
121
  {
121
  {
122
    data_type => "timestamp",
122
    data_type => "timestamp",
123
    datetime_undef_if_invalid => 1,
123
    datetime_undef_if_invalid => 1,
124
    default_value => \"current_timestamp",
124
    default_value => "current_timestamp()",
125
    is_nullable => 0,
125
    is_nullable => 0,
126
  },
126
  },
127
);
127
);
Lines 181-188 Composing rels: L</course_instructors> -> borrowernumber Link Here
181
__PACKAGE__->many_to_many("borrowernumbers", "course_instructors", "borrowernumber");
181
__PACKAGE__->many_to_many("borrowernumbers", "course_instructors", "borrowernumber");
182
182
183
183
184
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
184
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
185
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o0EBOuJCHxH5IG/PgsJfxg
185
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yeukLUSqlLJNVHxKDC7HOQ
186
186
187
187
188
# You can replace this text with custom content, and it will be preserved on regeneration
188
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/CourseItem.pm (-4 / +4 lines)
Lines 71-77 __PACKAGE__->table("course_items"); Link Here
71
71
72
  data_type: 'timestamp'
72
  data_type: 'timestamp'
73
  datetime_undef_if_invalid: 1
73
  datetime_undef_if_invalid: 1
74
  default_value: current_timestamp
74
  default_value: 'current_timestamp()'
75
  is_nullable: 0
75
  is_nullable: 0
76
76
77
=cut
77
=cut
Lines 100-106 __PACKAGE__->add_columns( Link Here
100
  {
100
  {
101
    data_type => "timestamp",
101
    data_type => "timestamp",
102
    datetime_undef_if_invalid => 1,
102
    datetime_undef_if_invalid => 1,
103
    default_value => \"current_timestamp",
103
    default_value => "current_timestamp()",
104
    is_nullable => 0,
104
    is_nullable => 0,
105
  },
105
  },
106
);
106
);
Lines 184-191 __PACKAGE__->belongs_to( Link Here
184
);
184
);
185
185
186
186
187
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-26 16:15:09
187
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
188
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0hBp2R7AMxgHLLZcG/676w
188
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VcUbKGA6rEwIg4cRse4fEg
189
189
190
190
191
# You can replace this text with custom content, and it will be preserved on regeneration
191
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/CourseReserve.pm (-4 / +4 lines)
Lines 55-61 __PACKAGE__->table("course_reserves"); Link Here
55
55
56
  data_type: 'timestamp'
56
  data_type: 'timestamp'
57
  datetime_undef_if_invalid: 1
57
  datetime_undef_if_invalid: 1
58
  default_value: current_timestamp
58
  default_value: 'current_timestamp()'
59
  is_nullable: 0
59
  is_nullable: 0
60
60
61
=cut
61
=cut
Lines 75-81 __PACKAGE__->add_columns( Link Here
75
  {
75
  {
76
    data_type => "timestamp",
76
    data_type => "timestamp",
77
    datetime_undef_if_invalid => 1,
77
    datetime_undef_if_invalid => 1,
78
    default_value => \"current_timestamp",
78
    default_value => "current_timestamp()",
79
    is_nullable => 0,
79
    is_nullable => 0,
80
  },
80
  },
81
);
81
);
Lines 141-148 __PACKAGE__->belongs_to( Link Here
141
);
141
);
142
142
143
143
144
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
144
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
145
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8SDdUrbxKuAwp6rgn85RmA
145
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ocHPOi2tze1PQCzzw9qY5w
146
146
147
147
148
# You can replace this text with custom content, and it will be preserved on regeneration
148
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/CreatorBatch.pm (-4 / +4 lines)
Lines 56-62 __PACKAGE__->table("creator_batches"); Link Here
56
56
57
  data_type: 'timestamp'
57
  data_type: 'timestamp'
58
  datetime_undef_if_invalid: 1
58
  datetime_undef_if_invalid: 1
59
  default_value: current_timestamp
59
  default_value: 'current_timestamp()'
60
  is_nullable: 0
60
  is_nullable: 0
61
61
62
=head2 branch_code
62
=head2 branch_code
Lines 91-97 __PACKAGE__->add_columns( Link Here
91
  {
91
  {
92
    data_type => "timestamp",
92
    data_type => "timestamp",
93
    datetime_undef_if_invalid => 1,
93
    datetime_undef_if_invalid => 1,
94
    default_value => \"current_timestamp",
94
    default_value => "current_timestamp()",
95
    is_nullable => 0,
95
    is_nullable => 0,
96
  },
96
  },
97
  "branch_code",
97
  "branch_code",
Lines 181-188 __PACKAGE__->belongs_to( Link Here
181
);
181
);
182
182
183
183
184
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-24 17:34:29
184
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
185
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5SOMkaJ6IxGtnqtPVFpNtg
185
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g3vD+wvEsI0GBWyvSMEFqg
186
186
187
187
188
# You can replace this text with custom content, and it will be preserved on regeneration
188
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Currency.pm (-4 / +4 lines)
Lines 46-52 __PACKAGE__->table("currency"); Link Here
46
46
47
  data_type: 'timestamp'
47
  data_type: 'timestamp'
48
  datetime_undef_if_invalid: 1
48
  datetime_undef_if_invalid: 1
49
  default_value: current_timestamp
49
  default_value: 'current_timestamp()'
50
  is_nullable: 0
50
  is_nullable: 0
51
51
52
=head2 rate
52
=head2 rate
Lines 85-91 __PACKAGE__->add_columns( Link Here
85
  {
85
  {
86
    data_type => "timestamp",
86
    data_type => "timestamp",
87
    datetime_undef_if_invalid => 1,
87
    datetime_undef_if_invalid => 1,
88
    default_value => \"current_timestamp",
88
    default_value => "current_timestamp()",
89
    is_nullable => 0,
89
    is_nullable => 0,
90
  },
90
  },
91
  "rate",
91
  "rate",
Lines 158-165 __PACKAGE__->has_many( Link Here
158
);
158
);
159
159
160
160
161
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-01 14:23:58
161
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
162
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PnJEcCgrM1Edf99phWFdyQ
162
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YaSxkG7ZGqegVkIif7NDjQ
163
163
164
164
165
sub koha_object_class {
165
sub koha_object_class {
(-)a/Koha/Schema/Result/Deletedbiblio.pm (-4 / +4 lines)
Lines 95-101 __PACKAGE__->table("deletedbiblio"); Link Here
95
95
96
  data_type: 'timestamp'
96
  data_type: 'timestamp'
97
  datetime_undef_if_invalid: 1
97
  datetime_undef_if_invalid: 1
98
  default_value: current_timestamp
98
  default_value: 'current_timestamp()'
99
  is_nullable: 0
99
  is_nullable: 0
100
100
101
=head2 datecreated
101
=head2 datecreated
Lines 142-148 __PACKAGE__->add_columns( Link Here
142
  {
142
  {
143
    data_type => "timestamp",
143
    data_type => "timestamp",
144
    datetime_undef_if_invalid => 1,
144
    datetime_undef_if_invalid => 1,
145
    default_value => \"current_timestamp",
145
    default_value => "current_timestamp()",
146
    is_nullable => 0,
146
    is_nullable => 0,
147
  },
147
  },
148
  "datecreated",
148
  "datecreated",
Lines 181-188 __PACKAGE__->has_many( Link Here
181
);
181
);
182
182
183
183
184
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-08-05 13:53:34
184
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
185
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FQaznWmkfR2Ge5NG8lDmSw
185
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9Xm2vadUVskBiHj/Ex84Sg
186
186
187
sub koha_objects_class {
187
sub koha_objects_class {
188
    'Koha::Old::Biblios';
188
    'Koha::Old::Biblios';
(-)a/Koha/Schema/Result/DeletedbiblioMetadata.pm (-4 / +4 lines)
Lines 56-62 __PACKAGE__->table("deletedbiblio_metadata"); Link Here
56
56
57
  data_type: 'timestamp'
57
  data_type: 'timestamp'
58
  datetime_undef_if_invalid: 1
58
  datetime_undef_if_invalid: 1
59
  default_value: current_timestamp
59
  default_value: 'current_timestamp()'
60
  is_nullable: 0
60
  is_nullable: 0
61
61
62
=cut
62
=cut
Lines 76-82 __PACKAGE__->add_columns( Link Here
76
  {
76
  {
77
    data_type => "timestamp",
77
    data_type => "timestamp",
78
    datetime_undef_if_invalid => 1,
78
    datetime_undef_if_invalid => 1,
79
    default_value => \"current_timestamp",
79
    default_value => "current_timestamp()",
80
    is_nullable => 0,
80
    is_nullable => 0,
81
  },
81
  },
82
);
82
);
Lines 132-139 __PACKAGE__->belongs_to( Link Here
132
);
132
);
133
133
134
134
135
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-30 11:34:16
135
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
136
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JCOh+FSSTgPlC8lMJOdOOA
136
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nIqHgwWZQKbGDIGTwNcR9w
137
137
138
138
139
# You can replace this text with custom code or comments, and it will be preserved on regeneration
139
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Deletedbiblioitem.pm (-4 / +4 lines)
Lines 117-123 __PACKAGE__->table("deletedbiblioitems"); Link Here
117
117
118
  data_type: 'timestamp'
118
  data_type: 'timestamp'
119
  datetime_undef_if_invalid: 1
119
  datetime_undef_if_invalid: 1
120
  default_value: current_timestamp
120
  default_value: 'current_timestamp()'
121
  is_nullable: 0
121
  is_nullable: 0
122
122
123
=head2 illus
123
=head2 illus
Lines 242-248 __PACKAGE__->add_columns( Link Here
242
  {
242
  {
243
    data_type => "timestamp",
243
    data_type => "timestamp",
244
    datetime_undef_if_invalid => 1,
244
    datetime_undef_if_invalid => 1,
245
    default_value => \"current_timestamp",
245
    default_value => "current_timestamp()",
246
    is_nullable => 0,
246
    is_nullable => 0,
247
  },
247
  },
248
  "illus",
248
  "illus",
Lines 288-295 __PACKAGE__->add_columns( Link Here
288
__PACKAGE__->set_primary_key("biblioitemnumber");
288
__PACKAGE__->set_primary_key("biblioitemnumber");
289
289
290
290
291
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
291
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
292
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QLYBa1Ea8Jau2Wy6U+wyQw
292
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A8v0vpPFLetnTSuMAb6SYA
293
293
294
sub koha_objects_class {
294
sub koha_objects_class {
295
    'Koha::Old::Biblioitems';
295
    'Koha::Old::Biblioitems';
(-)a/Koha/Schema/Result/Deletedborrower.pm (-4 / +4 lines)
Lines 422-428 __PACKAGE__->table("deletedborrowers"); Link Here
422
422
423
  data_type: 'timestamp'
423
  data_type: 'timestamp'
424
  datetime_undef_if_invalid: 1
424
  datetime_undef_if_invalid: 1
425
  default_value: current_timestamp
425
  default_value: 'current_timestamp()'
426
  is_nullable: 0
426
  is_nullable: 0
427
427
428
=head2 lastseen
428
=head2 lastseen
Lines 625-631 __PACKAGE__->add_columns( Link Here
625
  {
625
  {
626
    data_type => "timestamp",
626
    data_type => "timestamp",
627
    datetime_undef_if_invalid => 1,
627
    datetime_undef_if_invalid => 1,
628
    default_value => \"current_timestamp",
628
    default_value => "current_timestamp()",
629
    is_nullable => 0,
629
    is_nullable => 0,
630
  },
630
  },
631
  "lastseen",
631
  "lastseen",
Lines 650-657 __PACKAGE__->add_columns( Link Here
650
);
650
);
651
651
652
652
653
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-05-22 04:33:29
653
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
654
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zK1jC6Wawwj8B2ch9KFByw
654
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4FJOURzbg7/amSUXECLJsQ
655
655
656
sub koha_objects_class {
656
sub koha_objects_class {
657
    'Koha::Old::Patrons';
657
    'Koha::Old::Patrons';
(-)a/Koha/Schema/Result/Deleteditem.pm (-4 / +4 lines)
Lines 198-204 __PACKAGE__->table("deleteditems"); Link Here
198
198
199
  data_type: 'timestamp'
199
  data_type: 'timestamp'
200
  datetime_undef_if_invalid: 1
200
  datetime_undef_if_invalid: 1
201
  default_value: current_timestamp
201
  default_value: 'current_timestamp()'
202
  is_nullable: 0
202
  is_nullable: 0
203
203
204
=head2 location
204
=head2 location
Lines 360-366 __PACKAGE__->add_columns( Link Here
360
  {
360
  {
361
    data_type => "timestamp",
361
    data_type => "timestamp",
362
    datetime_undef_if_invalid => 1,
362
    datetime_undef_if_invalid => 1,
363
    default_value => \"current_timestamp",
363
    default_value => "current_timestamp()",
364
    is_nullable => 0,
364
    is_nullable => 0,
365
  },
365
  },
366
  "location",
366
  "location",
Lines 406-413 __PACKAGE__->add_columns( Link Here
406
__PACKAGE__->set_primary_key("itemnumber");
406
__PACKAGE__->set_primary_key("itemnumber");
407
407
408
408
409
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-17 10:42:24
409
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
410
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1+z3OHx5OpOcP82k8vyAaA
410
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d5Keiv9fRJlOT27yRtMX2w
411
411
412
sub koha_objects_class {
412
sub koha_objects_class {
413
    'Koha::Old::Items';
413
    'Koha::Old::Items';
(-)a/Koha/Schema/Result/Illcomment.pm (-4 / +4 lines)
Lines 51-57 __PACKAGE__->table("illcomments"); Link Here
51
51
52
  data_type: 'timestamp'
52
  data_type: 'timestamp'
53
  datetime_undef_if_invalid: 1
53
  datetime_undef_if_invalid: 1
54
  default_value: current_timestamp
54
  default_value: 'current_timestamp()'
55
  is_nullable: 0
55
  is_nullable: 0
56
56
57
=cut
57
=cut
Lines 74-80 __PACKAGE__->add_columns( Link Here
74
  {
74
  {
75
    data_type => "timestamp",
75
    data_type => "timestamp",
76
    datetime_undef_if_invalid => 1,
76
    datetime_undef_if_invalid => 1,
77
    default_value => \"current_timestamp",
77
    default_value => "current_timestamp()",
78
    is_nullable => 0,
78
    is_nullable => 0,
79
  },
79
  },
80
);
80
);
Lines 129-136 __PACKAGE__->belongs_to( Link Here
129
);
129
);
130
130
131
131
132
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-26 19:57:17
132
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
133
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JJC9ohn0V61+WzMppDKUJw
133
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:taV0nPCmNLIflefOr5YMKQ
134
134
135
135
136
# You can replace this text with custom code or comments, and it will be preserved on regeneration
136
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Illrequest.pm (-4 / +4 lines)
Lines 77-83 __PACKAGE__->table("illrequests"); Link Here
77
77
78
  data_type: 'timestamp'
78
  data_type: 'timestamp'
79
  datetime_undef_if_invalid: 1
79
  datetime_undef_if_invalid: 1
80
  default_value: current_timestamp
80
  default_value: 'current_timestamp()'
81
  is_nullable: 0
81
  is_nullable: 0
82
82
83
=head2 completed
83
=head2 completed
Lines 160-166 __PACKAGE__->add_columns( Link Here
160
  {
160
  {
161
    data_type => "timestamp",
161
    data_type => "timestamp",
162
    datetime_undef_if_invalid => 1,
162
    datetime_undef_if_invalid => 1,
163
    default_value => \"current_timestamp",
163
    default_value => "current_timestamp()",
164
    is_nullable => 0,
164
    is_nullable => 0,
165
  },
165
  },
166
  "completed",
166
  "completed",
Lines 283-290 __PACKAGE__->belongs_to( Link Here
283
);
283
);
284
284
285
285
286
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-02-22 14:32:49
286
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
287
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I6fY8XRfEmRxSzOeVT9Krw
287
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:drrFZCJQY+kKFxek3IBvUQ
288
288
289
289
290
# You can replace this text with custom code or comments, and it will be preserved on regeneration
290
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/ImportBatch.pm (-4 / +4 lines)
Lines 61-67 __PACKAGE__->table("import_batches"); Link Here
61
61
62
  data_type: 'timestamp'
62
  data_type: 'timestamp'
63
  datetime_undef_if_invalid: 1
63
  datetime_undef_if_invalid: 1
64
  default_value: current_timestamp
64
  default_value: 'current_timestamp()'
65
  is_nullable: 0
65
  is_nullable: 0
66
66
67
=head2 overlay_action
67
=head2 overlay_action
Lines 136-142 __PACKAGE__->add_columns( Link Here
136
  {
136
  {
137
    data_type => "timestamp",
137
    data_type => "timestamp",
138
    datetime_undef_if_invalid => 1,
138
    datetime_undef_if_invalid => 1,
139
    default_value => \"current_timestamp",
139
    default_value => "current_timestamp()",
140
    is_nullable => 0,
140
    is_nullable => 0,
141
  },
141
  },
142
  "overlay_action",
142
  "overlay_action",
Lines 235-242 __PACKAGE__->has_many( Link Here
235
);
235
);
236
236
237
237
238
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53
238
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
239
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:41giNJCRD9WXC4IGO/1D3A
239
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GmVg9yizOZg8hY8RKoKtEQ
240
240
241
241
242
# You can replace this text with custom content, and it will be preserved on regeneration
242
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/ImportRecord.pm (-4 / +4 lines)
Lines 51-57 __PACKAGE__->table("import_records"); Link Here
51
51
52
  data_type: 'timestamp'
52
  data_type: 'timestamp'
53
  datetime_undef_if_invalid: 1
53
  datetime_undef_if_invalid: 1
54
  default_value: current_timestamp
54
  default_value: 'current_timestamp()'
55
  is_nullable: 0
55
  is_nullable: 0
56
56
57
=head2 import_date
57
=head2 import_date
Lines 123-129 __PACKAGE__->add_columns( Link Here
123
  {
123
  {
124
    data_type => "timestamp",
124
    data_type => "timestamp",
125
    datetime_undef_if_invalid => 1,
125
    datetime_undef_if_invalid => 1,
126
    default_value => \"current_timestamp",
126
    default_value => "current_timestamp()",
127
    is_nullable => 0,
127
    is_nullable => 0,
128
  },
128
  },
129
  "import_date",
129
  "import_date",
Lines 262-269 __PACKAGE__->has_many( Link Here
262
);
262
);
263
263
264
264
265
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-04-18 10:50:48
265
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
266
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bqIAQzhgioWtBWU8zFdtjw
266
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jKLkfH2mLNE5UpMT/ZnbEA
267
267
268
268
269
# You can replace this text with custom content, and it will be preserved on regeneration
269
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Issue.pm (-4 / +4 lines)
Lines 87-93 __PACKAGE__->table("issues"); Link Here
87
87
88
  data_type: 'timestamp'
88
  data_type: 'timestamp'
89
  datetime_undef_if_invalid: 1
89
  datetime_undef_if_invalid: 1
90
  default_value: current_timestamp
90
  default_value: 'current_timestamp()'
91
  is_nullable: 0
91
  is_nullable: 0
92
92
93
=head2 issuedate
93
=head2 issuedate
Lines 157-163 __PACKAGE__->add_columns( Link Here
157
  {
157
  {
158
    data_type => "timestamp",
158
    data_type => "timestamp",
159
    datetime_undef_if_invalid => 1,
159
    datetime_undef_if_invalid => 1,
160
    default_value => \"current_timestamp",
160
    default_value => "current_timestamp()",
161
    is_nullable => 0,
161
    is_nullable => 0,
162
  },
162
  },
163
  "issuedate",
163
  "issuedate",
Lines 264-271 __PACKAGE__->might_have( Link Here
264
);
264
);
265
265
266
266
267
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-31 12:18:38
267
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
268
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QVmFa5b0Pe5OhUI92n9kzQ
268
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uu7Hv8HiASn3H6me2YHx1A
269
269
270
__PACKAGE__->add_columns(
270
__PACKAGE__->add_columns(
271
    '+auto_renew'      => { is_boolean => 1 },
271
    '+auto_renew'      => { is_boolean => 1 },
(-)a/Koha/Schema/Result/Item.pm (-4 / +19 lines)
Lines 202-208 __PACKAGE__->table("items"); Link Here
202
202
203
  data_type: 'timestamp'
203
  data_type: 'timestamp'
204
  datetime_undef_if_invalid: 1
204
  datetime_undef_if_invalid: 1
205
  default_value: current_timestamp
205
  default_value: 'current_timestamp()'
206
  is_nullable: 0
206
  is_nullable: 0
207
207
208
=head2 location
208
=head2 location
Lines 374-380 __PACKAGE__->add_columns( Link Here
374
  {
374
  {
375
    data_type => "timestamp",
375
    data_type => "timestamp",
376
    datetime_undef_if_invalid => 1,
376
    datetime_undef_if_invalid => 1,
377
    default_value => \"current_timestamp",
377
    default_value => "current_timestamp()",
378
    is_nullable => 0,
378
    is_nullable => 0,
379
  },
379
  },
380
  "location",
380
  "location",
Lines 625-630 __PACKAGE__->might_have( Link Here
625
  { cascade_copy => 0, cascade_delete => 0 },
625
  { cascade_copy => 0, cascade_delete => 0 },
626
);
626
);
627
627
628
=head2 items_bundle_item
629
630
Type: might_have
631
632
Related object: L<Koha::Schema::Result::ItemsBundleItem>
633
634
=cut
635
636
__PACKAGE__->might_have(
637
  "items_bundle_item",
638
  "Koha::Schema::Result::ItemsBundleItem",
639
  { "foreign.itemnumber" => "self.itemnumber" },
640
  { cascade_copy => 0, cascade_delete => 0 },
641
);
642
628
=head2 items_last_borrower
643
=head2 items_last_borrower
629
644
630
Type: might_have
645
Type: might_have
Lines 746-753 __PACKAGE__->has_many( Link Here
746
);
761
);
747
762
748
763
749
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-17 10:42:24
764
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
750
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CcrMhgq+PQ1MHV6jZEN8wA
765
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2OAwCv4uG2OqDkHGrMQlbw
751
766
752
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
767
__PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
753
768
(-)a/Koha/Schema/Result/ItemsLastBorrower.pm (-4 / +4 lines)
Lines 45-51 __PACKAGE__->table("items_last_borrower"); Link Here
45
45
46
  data_type: 'timestamp'
46
  data_type: 'timestamp'
47
  datetime_undef_if_invalid: 1
47
  datetime_undef_if_invalid: 1
48
  default_value: current_timestamp
48
  default_value: 'current_timestamp()'
49
  is_nullable: 0
49
  is_nullable: 0
50
50
51
=cut
51
=cut
Lines 61-67 __PACKAGE__->add_columns( Link Here
61
  {
61
  {
62
    data_type => "timestamp",
62
    data_type => "timestamp",
63
    datetime_undef_if_invalid => 1,
63
    datetime_undef_if_invalid => 1,
64
    default_value => \"current_timestamp",
64
    default_value => "current_timestamp()",
65
    is_nullable => 0,
65
    is_nullable => 0,
66
  },
66
  },
67
);
67
);
Lines 125-132 __PACKAGE__->belongs_to( Link Here
125
);
125
);
126
126
127
127
128
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-02 12:33:33
128
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
129
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ByHKNZCEz4a1AqTnOJgUWA
129
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uKe825x+YA0n7O8HxdC0BA
130
130
131
131
132
# You can replace this text with custom code or comments, and it will be preserved on regeneration
132
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/LibraryGroup.pm (-4 / +4 lines)
Lines 87-93 __PACKAGE__->table("library_groups"); Link Here
87
87
88
  data_type: 'timestamp'
88
  data_type: 'timestamp'
89
  datetime_undef_if_invalid: 1
89
  datetime_undef_if_invalid: 1
90
  default_value: current_timestamp
90
  default_value: 'current_timestamp()'
91
  is_nullable: 0
91
  is_nullable: 0
92
92
93
=cut
93
=cut
Lines 121-127 __PACKAGE__->add_columns( Link Here
121
  {
121
  {
122
    data_type => "timestamp",
122
    data_type => "timestamp",
123
    datetime_undef_if_invalid => 1,
123
    datetime_undef_if_invalid => 1,
124
    default_value => \"current_timestamp",
124
    default_value => "current_timestamp()",
125
    is_nullable => 0,
125
    is_nullable => 0,
126
  },
126
  },
127
);
127
);
Lines 224-231 __PACKAGE__->belongs_to( Link Here
224
);
224
);
225
225
226
226
227
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-30 15:43:39
227
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
228
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qg0Ckj0ZBRjSaQgEcvxSZA
228
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cgoo1VFsYRC2VPqVu613NQ
229
229
230
sub koha_object_class {
230
sub koha_object_class {
231
    'Koha::Library::Group';
231
    'Koha::Library::Group';
(-)a/Koha/Schema/Result/Message.pm (-4 / +4 lines)
Lines 56-62 __PACKAGE__->table("messages"); Link Here
56
56
57
  data_type: 'timestamp'
57
  data_type: 'timestamp'
58
  datetime_undef_if_invalid: 1
58
  datetime_undef_if_invalid: 1
59
  default_value: current_timestamp
59
  default_value: 'current_timestamp()'
60
  is_nullable: 0
60
  is_nullable: 0
61
61
62
=head2 manager_id
62
=head2 manager_id
Lines 82-88 __PACKAGE__->add_columns( Link Here
82
  {
82
  {
83
    data_type => "timestamp",
83
    data_type => "timestamp",
84
    datetime_undef_if_invalid => 1,
84
    datetime_undef_if_invalid => 1,
85
    default_value => \"current_timestamp",
85
    default_value => "current_timestamp()",
86
    is_nullable => 0,
86
    is_nullable => 0,
87
  },
87
  },
88
  "manager_id",
88
  "manager_id",
Lines 139-146 __PACKAGE__->belongs_to( Link Here
139
);
139
);
140
140
141
141
142
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-02-15 13:15:09
142
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
143
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kYM+0CFPm/wdNp7EosdlRw
143
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Czgoljvkzbs8ta0hXTxqMA
144
144
145
sub koha_object_class {
145
sub koha_object_class {
146
    'Koha::Patron::Message';
146
    'Koha::Patron::Message';
(-)a/Koha/Schema/Result/MessageQueue.pm (-4 / +4 lines)
Lines 80-86 __PACKAGE__->table("message_queue"); Link Here
80
80
81
  data_type: 'timestamp'
81
  data_type: 'timestamp'
82
  datetime_undef_if_invalid: 1
82
  datetime_undef_if_invalid: 1
83
  default_value: current_timestamp
83
  default_value: 'current_timestamp()'
84
  is_nullable: 0
84
  is_nullable: 0
85
85
86
=head2 to_address
86
=head2 to_address
Lines 132-138 __PACKAGE__->add_columns( Link Here
132
  {
132
  {
133
    data_type => "timestamp",
133
    data_type => "timestamp",
134
    datetime_undef_if_invalid => 1,
134
    datetime_undef_if_invalid => 1,
135
    default_value => \"current_timestamp",
135
    default_value => "current_timestamp()",
136
    is_nullable => 0,
136
    is_nullable => 0,
137
  },
137
  },
138
  "to_address",
138
  "to_address",
Lines 193-200 __PACKAGE__->belongs_to( Link Here
193
);
193
);
194
194
195
195
196
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-05 14:26:34
196
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
197
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fSWIVVJGliKtqQaNbmZKYQ
197
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0L+d9pWy9VZz2uwJsQNB7Q
198
198
199
sub koha_object_class {
199
sub koha_object_class {
200
    'Koha::Notice::Message';
200
    'Koha::Notice::Message';
(-)a/Koha/Schema/Result/MiscFile.pm (-4 / +4 lines)
Lines 67-73 __PACKAGE__->table("misc_files"); Link Here
67
67
68
  data_type: 'timestamp'
68
  data_type: 'timestamp'
69
  datetime_undef_if_invalid: 1
69
  datetime_undef_if_invalid: 1
70
  default_value: current_timestamp
70
  default_value: 'current_timestamp()'
71
  is_nullable: 0
71
  is_nullable: 0
72
72
73
=cut
73
=cut
Lines 91-97 __PACKAGE__->add_columns( Link Here
91
  {
91
  {
92
    data_type => "timestamp",
92
    data_type => "timestamp",
93
    datetime_undef_if_invalid => 1,
93
    datetime_undef_if_invalid => 1,
94
    default_value => \"current_timestamp",
94
    default_value => "current_timestamp()",
95
    is_nullable => 0,
95
    is_nullable => 0,
96
  },
96
  },
97
);
97
);
Lines 109-116 __PACKAGE__->add_columns( Link Here
109
__PACKAGE__->set_primary_key("file_id");
109
__PACKAGE__->set_primary_key("file_id");
110
110
111
111
112
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-05-25 21:17:02
112
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
113
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VWGyKXxK0dqymMsEGCjJxg
113
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QPuF+Cb4BVGp2rqB18JWnw
114
114
115
115
116
# You can replace this text with custom code or comments, and it will be preserved on regeneration
116
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/NeedMergeAuthority.pm (-4 / +4 lines)
Lines 48-54 __PACKAGE__->table("need_merge_authorities"); Link Here
48
48
49
  data_type: 'timestamp'
49
  data_type: 'timestamp'
50
  datetime_undef_if_invalid: 1
50
  datetime_undef_if_invalid: 1
51
  default_value: current_timestamp
51
  default_value: 'current_timestamp()'
52
  is_nullable: 0
52
  is_nullable: 0
53
53
54
=head2 done
54
=head2 done
Lines 72-78 __PACKAGE__->add_columns( Link Here
72
  {
72
  {
73
    data_type => "timestamp",
73
    data_type => "timestamp",
74
    datetime_undef_if_invalid => 1,
74
    datetime_undef_if_invalid => 1,
75
    default_value => \"current_timestamp",
75
    default_value => "current_timestamp()",
76
    is_nullable => 0,
76
    is_nullable => 0,
77
  },
77
  },
78
  "done",
78
  "done",
Lines 92-99 __PACKAGE__->add_columns( Link Here
92
__PACKAGE__->set_primary_key("id");
92
__PACKAGE__->set_primary_key("id");
93
93
94
94
95
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
95
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
96
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7LzwIYvExKvNgr8/HDZlsg
96
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m8L0rNMzZk0cLGj2LFEDwA
97
97
98
sub koha_object_class {
98
sub koha_object_class {
99
    'Koha::Authority::MergeRequest';
99
    'Koha::Authority::MergeRequest';
(-)a/Koha/Schema/Result/OldIssue.pm (-4 / +4 lines)
Lines 86-92 __PACKAGE__->table("old_issues"); Link Here
86
86
87
  data_type: 'timestamp'
87
  data_type: 'timestamp'
88
  datetime_undef_if_invalid: 1
88
  datetime_undef_if_invalid: 1
89
  default_value: current_timestamp
89
  default_value: 'current_timestamp()'
90
  is_nullable: 0
90
  is_nullable: 0
91
91
92
=head2 issuedate
92
=head2 issuedate
Lines 156-162 __PACKAGE__->add_columns( Link Here
156
  {
156
  {
157
    data_type => "timestamp",
157
    data_type => "timestamp",
158
    datetime_undef_if_invalid => 1,
158
    datetime_undef_if_invalid => 1,
159
    default_value => \"current_timestamp",
159
    default_value => "current_timestamp()",
160
    is_nullable => 0,
160
    is_nullable => 0,
161
  },
161
  },
162
  "issuedate",
162
  "issuedate",
Lines 234-241 __PACKAGE__->belongs_to( Link Here
234
);
234
);
235
235
236
236
237
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-04-10 19:55:44
237
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
238
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E2N2paWcCHg916100ry+2A
238
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aRRi1sRKr7IguXs8IvIoDw
239
239
240
__PACKAGE__->add_columns(
240
__PACKAGE__->add_columns(
241
    '+auto_renew'      => { is_boolean => 1 },
241
    '+auto_renew'      => { is_boolean => 1 },
(-)a/Koha/Schema/Result/OldReserve.pm (-4 / +4 lines)
Lines 90-96 __PACKAGE__->table("old_reserves"); Link Here
90
90
91
  data_type: 'timestamp'
91
  data_type: 'timestamp'
92
  datetime_undef_if_invalid: 1
92
  datetime_undef_if_invalid: 1
93
  default_value: current_timestamp
93
  default_value: 'current_timestamp()'
94
  is_nullable: 0
94
  is_nullable: 0
95
95
96
=head2 itemnumber
96
=head2 itemnumber
Lines 172-178 __PACKAGE__->add_columns( Link Here
172
  {
172
  {
173
    data_type => "timestamp",
173
    data_type => "timestamp",
174
    datetime_undef_if_invalid => 1,
174
    datetime_undef_if_invalid => 1,
175
    default_value => \"current_timestamp",
175
    default_value => "current_timestamp()",
176
    is_nullable => 0,
176
    is_nullable => 0,
177
  },
177
  },
178
  "itemnumber",
178
  "itemnumber",
Lines 297-304 __PACKAGE__->belongs_to( Link Here
297
);
297
);
298
298
299
299
300
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-06-17 07:24:39
300
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
301
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZgGAW7ODBby3hGNJ41eeMA
301
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I4D3WJSvd7KTyWF+9M4D4w
302
302
303
sub koha_object_class {
303
sub koha_object_class {
304
    'Koha::Old::Hold';
304
    'Koha::Old::Hold';
(-)a/Koha/Schema/Result/OpacNews.pm (-4 / +4 lines)
Lines 60-66 __PACKAGE__->table("opac_news"); Link Here
60
60
61
  data_type: 'timestamp'
61
  data_type: 'timestamp'
62
  datetime_undef_if_invalid: 1
62
  datetime_undef_if_invalid: 1
63
  default_value: current_timestamp
63
  default_value: 'current_timestamp()'
64
  is_nullable: 0
64
  is_nullable: 0
65
65
66
=head2 expirationdate
66
=head2 expirationdate
Lines 102-108 __PACKAGE__->add_columns( Link Here
102
  {
102
  {
103
    data_type => "timestamp",
103
    data_type => "timestamp",
104
    datetime_undef_if_invalid => 1,
104
    datetime_undef_if_invalid => 1,
105
    default_value => \"current_timestamp",
105
    default_value => "current_timestamp()",
106
    is_nullable => 0,
106
    is_nullable => 0,
107
  },
107
  },
108
  "expirationdate",
108
  "expirationdate",
Lines 168-175 __PACKAGE__->belongs_to( Link Here
168
);
168
);
169
169
170
170
171
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
171
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
172
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gApTRM/dF6uZSMYyvkt4OQ
172
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gkBxrFM46U1oEQDXahQxMA
173
173
174
sub koha_object_class {
174
sub koha_object_class {
175
    'Koha::NewsItem';
175
    'Koha::NewsItem';
(-)a/Koha/Schema/Result/PendingOfflineOperation.pm (-4 / +4 lines)
Lines 45-51 __PACKAGE__->table("pending_offline_operations"); Link Here
45
45
46
  data_type: 'timestamp'
46
  data_type: 'timestamp'
47
  datetime_undef_if_invalid: 1
47
  datetime_undef_if_invalid: 1
48
  default_value: current_timestamp
48
  default_value: 'current_timestamp()'
49
  is_nullable: 0
49
  is_nullable: 0
50
50
51
=head2 action
51
=head2 action
Lines 85-91 __PACKAGE__->add_columns( Link Here
85
  {
85
  {
86
    data_type => "timestamp",
86
    data_type => "timestamp",
87
    datetime_undef_if_invalid => 1,
87
    datetime_undef_if_invalid => 1,
88
    default_value => \"current_timestamp",
88
    default_value => "current_timestamp()",
89
    is_nullable => 0,
89
    is_nullable => 0,
90
  },
90
  },
91
  "action",
91
  "action",
Lines 111-118 __PACKAGE__->add_columns( Link Here
111
__PACKAGE__->set_primary_key("operationid");
111
__PACKAGE__->set_primary_key("operationid");
112
112
113
113
114
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-27 13:24:06
114
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
115
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EA2gwvRWvFVCPyIB94jCdw
115
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kd5wVqCpZO7PRNMlAvSeJw
116
116
117
117
118
# You can replace this text with custom content, and it will be preserved on regeneration
118
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Rating.pm (-4 / +4 lines)
Lines 44-50 __PACKAGE__->table("ratings"); Link Here
44
44
45
  data_type: 'timestamp'
45
  data_type: 'timestamp'
46
  datetime_undef_if_invalid: 1
46
  datetime_undef_if_invalid: 1
47
  default_value: current_timestamp
47
  default_value: 'current_timestamp()'
48
  is_nullable: 0
48
  is_nullable: 0
49
49
50
=cut
50
=cut
Lines 60-66 __PACKAGE__->add_columns( Link Here
60
  {
60
  {
61
    data_type => "timestamp",
61
    data_type => "timestamp",
62
    datetime_undef_if_invalid => 1,
62
    datetime_undef_if_invalid => 1,
63
    default_value => \"current_timestamp",
63
    default_value => "current_timestamp()",
64
    is_nullable => 0,
64
    is_nullable => 0,
65
  },
65
  },
66
);
66
);
Lines 112-119 __PACKAGE__->belongs_to( Link Here
112
);
112
);
113
113
114
114
115
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
115
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
116
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YT3jPQbA2TBuOuUXfEt7gQ
116
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:01Smg8hro7ZNrATvWSxsVQ
117
117
118
118
119
# You can replace this text with custom content, and it will be preserved on regeneration
119
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/RepeatableHoliday.pm (-3 / +10 lines)
Lines 32-37 __PACKAGE__->table("repeatable_holidays"); Link Here
32
=head2 branchcode
32
=head2 branchcode
33
33
34
  data_type: 'varchar'
34
  data_type: 'varchar'
35
  default_value: (empty string)
35
  is_foreign_key: 1
36
  is_foreign_key: 1
36
  is_nullable: 0
37
  is_nullable: 0
37
  size: 10
38
  size: 10
Lines 69-75 __PACKAGE__->add_columns( Link Here
69
  "id",
70
  "id",
70
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
71
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
71
  "branchcode",
72
  "branchcode",
72
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
73
  {
74
    data_type => "varchar",
75
    default_value => "",
76
    is_foreign_key => 1,
77
    is_nullable => 0,
78
    size => 10,
79
  },
73
  "weekday",
80
  "weekday",
74
  { data_type => "smallint", is_nullable => 1 },
81
  { data_type => "smallint", is_nullable => 1 },
75
  "day",
82
  "day",
Lines 112-119 __PACKAGE__->belongs_to( Link Here
112
);
119
);
113
120
114
121
115
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-20 13:57:27
122
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
116
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bBw2WEvzF5sX+AOteNsPPQ
123
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wiRQ/s8GNyqViiJmG3HMRQ
117
124
118
125
119
# You can replace this text with custom content, and it will be preserved on regeneration
126
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Reserve.pm (-4 / +4 lines)
Lines 94-100 __PACKAGE__->table("reserves"); Link Here
94
94
95
  data_type: 'timestamp'
95
  data_type: 'timestamp'
96
  datetime_undef_if_invalid: 1
96
  datetime_undef_if_invalid: 1
97
  default_value: current_timestamp
97
  default_value: 'current_timestamp()'
98
  is_nullable: 0
98
  is_nullable: 0
99
99
100
=head2 itemnumber
100
=head2 itemnumber
Lines 186-192 __PACKAGE__->add_columns( Link Here
186
  {
186
  {
187
    data_type => "timestamp",
187
    data_type => "timestamp",
188
    datetime_undef_if_invalid => 1,
188
    datetime_undef_if_invalid => 1,
189
    default_value => \"current_timestamp",
189
    default_value => "current_timestamp()",
190
    is_nullable => 0,
190
    is_nullable => 0,
191
  },
191
  },
192
  "itemnumber",
192
  "itemnumber",
Lines 336-343 __PACKAGE__->belongs_to( Link Here
336
);
336
);
337
337
338
338
339
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:48
339
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
340
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pc5zh5iFbdwko5KS51Y9Uw
340
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jZhq1NVVcesKshzQvWopuw
341
341
342
__PACKAGE__->belongs_to(
342
__PACKAGE__->belongs_to(
343
  "item",
343
  "item",
(-)a/Koha/Schema/Result/SearchHistory.pm (-4 / +4 lines)
Lines 67-73 __PACKAGE__->table("search_history"); Link Here
67
67
68
  data_type: 'timestamp'
68
  data_type: 'timestamp'
69
  datetime_undef_if_invalid: 1
69
  datetime_undef_if_invalid: 1
70
  default_value: current_timestamp
70
  default_value: 'current_timestamp()'
71
  is_nullable: 0
71
  is_nullable: 0
72
72
73
=cut
73
=cut
Lines 96-102 __PACKAGE__->add_columns( Link Here
96
  {
96
  {
97
    data_type => "timestamp",
97
    data_type => "timestamp",
98
    datetime_undef_if_invalid => 1,
98
    datetime_undef_if_invalid => 1,
99
    default_value => \"current_timestamp",
99
    default_value => "current_timestamp()",
100
    is_nullable => 0,
100
    is_nullable => 0,
101
  },
101
  },
102
);
102
);
Lines 114-121 __PACKAGE__->add_columns( Link Here
114
__PACKAGE__->set_primary_key("id");
114
__PACKAGE__->set_primary_key("id");
115
115
116
116
117
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
117
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
118
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d+Qf8sL7wLldvw2qPLoBgQ
118
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VMVGSV8eY1KTpJVv0Nm5lA
119
119
120
120
121
# You can replace this text with custom content, and it will be preserved on regeneration
121
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/SearchMarcToField.pm (-10 / +10 lines)
Lines 23-34 __PACKAGE__->table("search_marc_to_field"); Link Here
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
26
=head2 search
27
28
  data_type: 'tinyint'
29
  default_value: 1
30
  is_nullable: 0
31
32
=head2 search_marc_map_id
26
=head2 search_marc_map_id
33
27
34
  data_type: 'integer'
28
  data_type: 'integer'
Lines 64-74 true if this field can be used to generate suggestions for browse Link Here
64
58
65
true/false creates special sort handling, null doesn't
59
true/false creates special sort handling, null doesn't
66
60
61
=head2 search
62
63
  data_type: 'tinyint'
64
  default_value: 1
65
  is_nullable: 0
66
67
=cut
67
=cut
68
68
69
__PACKAGE__->add_columns(
69
__PACKAGE__->add_columns(
70
  "search",
71
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
72
  "search_marc_map_id",
70
  "search_marc_map_id",
73
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
71
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
74
  "search_field_id",
72
  "search_field_id",
Lines 79-84 __PACKAGE__->add_columns( Link Here
79
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
77
  { data_type => "tinyint", default_value => 0, is_nullable => 1 },
80
  "sort",
78
  "sort",
81
  { data_type => "tinyint", is_nullable => 1 },
79
  { data_type => "tinyint", is_nullable => 1 },
80
  "search",
81
  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
82
);
82
);
83
83
84
=head1 PRIMARY KEY
84
=head1 PRIMARY KEY
Lines 128-135 __PACKAGE__->belongs_to( Link Here
128
);
128
);
129
129
130
130
131
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-02 12:47:22
131
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
132
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9mqZ/zrii+Fv+k+eQNHYUw
132
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NH2gQdc4p5gyGwbKuXIlkQ
133
133
134
134
135
# You can replace this text with custom code or comments, and it will be preserved on regeneration
135
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Serial.pm (-9 / +2 lines)
Lines 109-119 __PACKAGE__->table("serial"); Link Here
109
  default_value: 0
109
  default_value: 0
110
  is_nullable: 1
110
  is_nullable: 1
111
111
112
=head2 routingnotes
113
114
  data_type: 'mediumtext'
115
  is_nullable: 1
116
117
=cut
112
=cut
118
113
119
__PACKAGE__->add_columns(
114
__PACKAGE__->add_columns(
Lines 145-152 __PACKAGE__->add_columns( Link Here
145
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
140
  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
146
  "claims_count",
141
  "claims_count",
147
  { data_type => "integer", default_value => 0, is_nullable => 1 },
142
  { data_type => "integer", default_value => 0, is_nullable => 1 },
148
  "routingnotes",
149
  { data_type => "mediumtext", is_nullable => 1 },
150
);
143
);
151
144
152
=head1 PRIMARY KEY
145
=head1 PRIMARY KEY
Lines 179-186 __PACKAGE__->has_many( Link Here
179
);
172
);
180
173
181
174
182
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
175
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
183
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sRygXoIOnqpdk0lqVMcBdA
176
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p5Ds0c7eiE3KTmFDHVMxqQ
184
177
185
178
186
# You can replace this text with custom code or comments, and it will be preserved on regeneration
179
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/SpecialHoliday.pm (-3 / +10 lines)
Lines 32-37 __PACKAGE__->table("special_holidays"); Link Here
32
=head2 branchcode
32
=head2 branchcode
33
33
34
  data_type: 'varchar'
34
  data_type: 'varchar'
35
  default_value: (empty string)
35
  is_foreign_key: 1
36
  is_foreign_key: 1
36
  is_nullable: 0
37
  is_nullable: 0
37
  size: 10
38
  size: 10
Lines 78-84 __PACKAGE__->add_columns( Link Here
78
  "id",
79
  "id",
79
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
80
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
80
  "branchcode",
81
  "branchcode",
81
  { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 },
82
  {
83
    data_type => "varchar",
84
    default_value => "",
85
    is_foreign_key => 1,
86
    is_nullable => 0,
87
    size => 10,
88
  },
82
  "day",
89
  "day",
83
  { data_type => "smallint", default_value => 0, is_nullable => 0 },
90
  { data_type => "smallint", default_value => 0, is_nullable => 0 },
84
  "month",
91
  "month",
Lines 123-130 __PACKAGE__->belongs_to( Link Here
123
);
130
);
124
131
125
132
126
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-20 13:57:27
133
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
127
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cj8Oveni0l6kAR/azmw4SA
134
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M1IWe2I5Gam4ItJoHeNntA
128
135
129
136
130
# You can replace this text with custom content, and it will be preserved on regeneration
137
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Subscriptionroutinglist.pm (-48 / +32 lines)
Lines 23-127 __PACKAGE__->table("subscriptionroutinglist"); Link Here
23
23
24
=head1 ACCESSORS
24
=head1 ACCESSORS
25
25
26
=head2 routingid
26
=head2 routinglistid
27
27
28
  data_type: 'integer'
28
  data_type: 'integer'
29
  is_auto_increment: 1
29
  is_auto_increment: 1
30
  is_nullable: 0
30
  is_nullable: 0
31
31
32
=head2 borrowernumber
32
=head2 subscriptionid
33
33
34
  data_type: 'integer'
34
  data_type: 'integer'
35
  is_foreign_key: 1
35
  is_foreign_key: 1
36
  is_nullable: 0
36
  is_nullable: 0
37
37
38
=head2 ranking
38
=head2 title
39
39
40
  data_type: 'integer'
40
  data_type: 'varchar'
41
  is_nullable: 1
41
  is_nullable: 0
42
  size: 256
42
43
43
=head2 subscriptionid
44
=head2 notes
44
45
45
  data_type: 'integer'
46
  data_type: 'text'
46
  is_foreign_key: 1
47
  is_nullable: 1
47
  is_nullable: 0
48
48
49
=cut
49
=cut
50
50
51
__PACKAGE__->add_columns(
51
__PACKAGE__->add_columns(
52
  "routingid",
52
  "routinglistid",
53
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
53
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
54
  "borrowernumber",
55
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
56
  "ranking",
57
  { data_type => "integer", is_nullable => 1 },
58
  "subscriptionid",
54
  "subscriptionid",
59
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
55
  { data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
56
  "title",
57
  { data_type => "varchar", is_nullable => 0, size => 256 },
58
  "notes",
59
  { data_type => "text", is_nullable => 1 },
60
);
60
);
61
61
62
=head1 PRIMARY KEY
62
=head1 PRIMARY KEY
63
63
64
=over 4
64
=over 4
65
65
66
=item * L</routingid>
66
=item * L</routinglistid>
67
67
68
=back
68
=back
69
69
70
=cut
70
=cut
71
71
72
__PACKAGE__->set_primary_key("routingid");
72
__PACKAGE__->set_primary_key("routinglistid");
73
74
=head1 UNIQUE CONSTRAINTS
75
76
=head2 C<subscriptionid>
77
78
=over 4
79
80
=item * L</subscriptionid>
81
82
=item * L</borrowernumber>
83
84
=back
85
86
=cut
87
88
__PACKAGE__->add_unique_constraint("subscriptionid", ["subscriptionid", "borrowernumber"]);
89
73
90
=head1 RELATIONS
74
=head1 RELATIONS
91
75
92
=head2 borrowernumber
76
=head2 subscriptionid
93
77
94
Type: belongs_to
78
Type: belongs_to
95
79
96
Related object: L<Koha::Schema::Result::Borrower>
80
Related object: L<Koha::Schema::Result::Subscription>
97
81
98
=cut
82
=cut
99
83
100
__PACKAGE__->belongs_to(
84
__PACKAGE__->belongs_to(
101
  "borrowernumber",
85
  "subscriptionid",
102
  "Koha::Schema::Result::Borrower",
86
  "Koha::Schema::Result::Subscription",
103
  { borrowernumber => "borrowernumber" },
87
  { subscriptionid => "subscriptionid" },
104
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
88
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" },
105
);
89
);
106
90
107
=head2 subscriptionid
91
=head2 subscriptionroutings
108
92
109
Type: belongs_to
93
Type: has_many
110
94
111
Related object: L<Koha::Schema::Result::Subscription>
95
Related object: L<Koha::Schema::Result::Subscriptionrouting>
112
96
113
=cut
97
=cut
114
98
115
__PACKAGE__->belongs_to(
99
__PACKAGE__->has_many(
116
  "subscriptionid",
100
  "subscriptionroutings",
117
  "Koha::Schema::Result::Subscription",
101
  "Koha::Schema::Result::Subscriptionrouting",
118
  { subscriptionid => "subscriptionid" },
102
  { "foreign.routinglistid" => "self.routinglistid" },
119
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
103
  { cascade_copy => 0, cascade_delete => 0 },
120
);
104
);
121
105
122
106
123
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
107
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
124
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AK595c56vgTa7ZjwZjberw
108
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ybxwm+MNY+0Z8txgjjIahw
125
109
126
sub koha_object_class {
110
sub koha_object_class {
127
    'Koha::Subscription::Routinglist';
111
    'Koha::Subscription::Routinglist';
(-)a/Koha/Schema/Result/Suggestion.pm (-4 / +4 lines)
Lines 117-123 __PACKAGE__->table("suggestions"); Link Here
117
117
118
  data_type: 'timestamp'
118
  data_type: 'timestamp'
119
  datetime_undef_if_invalid: 1
119
  datetime_undef_if_invalid: 1
120
  default_value: current_timestamp
120
  default_value: 'current_timestamp()'
121
  is_nullable: 0
121
  is_nullable: 0
122
122
123
=head2 volumedesc
123
=head2 volumedesc
Lines 250-256 __PACKAGE__->add_columns( Link Here
250
  {
250
  {
251
    data_type => "timestamp",
251
    data_type => "timestamp",
252
    datetime_undef_if_invalid => 1,
252
    datetime_undef_if_invalid => 1,
253
    default_value => \"current_timestamp",
253
    default_value => "current_timestamp()",
254
    is_nullable => 0,
254
    is_nullable => 0,
255
  },
255
  },
256
  "volumedesc",
256
  "volumedesc",
Lines 440-447 __PACKAGE__->belongs_to( Link Here
440
);
440
);
441
441
442
442
443
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-11 12:56:41
443
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
444
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UsG/gxLa0HMMbcpbscV29Q
444
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jonzJsbNRJnB1hso6kIqUQ
445
445
446
__PACKAGE__->belongs_to(
446
__PACKAGE__->belongs_to(
447
  "suggester",
447
  "suggester",
(-)a/Koha/Schema/Result/UploadedFile.pm (-4 / +4 lines)
Lines 54-60 __PACKAGE__->table("uploaded_files"); Link Here
54
54
55
  data_type: 'timestamp'
55
  data_type: 'timestamp'
56
  datetime_undef_if_invalid: 1
56
  datetime_undef_if_invalid: 1
57
  default_value: current_timestamp
57
  default_value: 'current_timestamp()'
58
  is_nullable: 0
58
  is_nullable: 0
59
59
60
=head2 uploadcategorycode
60
=head2 uploadcategorycode
Lines 94-100 __PACKAGE__->add_columns( Link Here
94
  {
94
  {
95
    data_type => "timestamp",
95
    data_type => "timestamp",
96
    datetime_undef_if_invalid => 1,
96
    datetime_undef_if_invalid => 1,
97
    default_value => \"current_timestamp",
97
    default_value => "current_timestamp()",
98
    is_nullable => 0,
98
    is_nullable => 0,
99
  },
99
  },
100
  "uploadcategorycode",
100
  "uploadcategorycode",
Lines 120-127 __PACKAGE__->add_columns( Link Here
120
__PACKAGE__->set_primary_key("id");
120
__PACKAGE__->set_primary_key("id");
121
121
122
122
123
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54
123
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
124
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kJUbIULQMBo3t51HvWC8cg
124
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dUELzltCRxC2Nfwy0MVpCw
125
125
126
126
127
# You can replace this text with custom code or comments, and it will be preserved on regeneration
127
# You can replace this text with custom code or comments, and it will be preserved on regeneration
(-)a/Koha/Schema/Result/Virtualshelfcontent.pm (-4 / +4 lines)
Lines 46-52 __PACKAGE__->table("virtualshelfcontents"); Link Here
46
46
47
  data_type: 'timestamp'
47
  data_type: 'timestamp'
48
  datetime_undef_if_invalid: 1
48
  datetime_undef_if_invalid: 1
49
  default_value: current_timestamp
49
  default_value: 'current_timestamp()'
50
  is_nullable: 0
50
  is_nullable: 0
51
51
52
=head2 borrowernumber
52
=head2 borrowernumber
Lines 78-84 __PACKAGE__->add_columns( Link Here
78
  {
78
  {
79
    data_type => "timestamp",
79
    data_type => "timestamp",
80
    datetime_undef_if_invalid => 1,
80
    datetime_undef_if_invalid => 1,
81
    default_value => \"current_timestamp",
81
    default_value => "current_timestamp()",
82
    is_nullable => 0,
82
    is_nullable => 0,
83
  },
83
  },
84
  "borrowernumber",
84
  "borrowernumber",
Lines 138-145 __PACKAGE__->belongs_to( Link Here
138
);
138
);
139
139
140
140
141
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55
141
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
142
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ie3Gx+/HthZQ/4fHjcPF0w
142
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:20iSu9w0DCT2jgIOUpybyg
143
143
144
#TODO See BZ 14544: Should be resolved by db revision
144
#TODO See BZ 14544: Should be resolved by db revision
145
__PACKAGE__->set_primary_key("shelfnumber","biblionumber");
145
__PACKAGE__->set_primary_key("shelfnumber","biblionumber");
(-)a/Koha/Schema/Result/Virtualshelve.pm (-4 / +4 lines)
Lines 58-64 __PACKAGE__->table("virtualshelves"); Link Here
58
58
59
  data_type: 'timestamp'
59
  data_type: 'timestamp'
60
  datetime_undef_if_invalid: 1
60
  datetime_undef_if_invalid: 1
61
  default_value: current_timestamp
61
  default_value: 'current_timestamp()'
62
  is_nullable: 0
62
  is_nullable: 0
63
63
64
=head2 created_on
64
=head2 created_on
Lines 101-107 __PACKAGE__->add_columns( Link Here
101
  {
101
  {
102
    data_type => "timestamp",
102
    data_type => "timestamp",
103
    datetime_undef_if_invalid => 1,
103
    datetime_undef_if_invalid => 1,
104
    default_value => \"current_timestamp",
104
    default_value => "current_timestamp()",
105
    is_nullable => 0,
105
    is_nullable => 0,
106
  },
106
  },
107
  "created_on",
107
  "created_on",
Lines 181-188 __PACKAGE__->has_many( Link Here
181
);
181
);
182
182
183
183
184
# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-08 14:19:17
184
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
185
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Xoq0lhLouCbkAp6F4ZyMGQ
185
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:59Elqv1XBtx7Sf9TI+yEDA
186
186
187
sub koha_object_class {
187
sub koha_object_class {
188
    'Koha::Virtualshelf';
188
    'Koha::Virtualshelf';
(-)a/Koha/Schema/Result/Zebraqueue.pm (-4 / +4 lines)
Lines 60-66 __PACKAGE__->table("zebraqueue"); Link Here
60
60
61
  data_type: 'timestamp'
61
  data_type: 'timestamp'
62
  datetime_undef_if_invalid: 1
62
  datetime_undef_if_invalid: 1
63
  default_value: current_timestamp
63
  default_value: 'current_timestamp()'
64
  is_nullable: 0
64
  is_nullable: 0
65
65
66
=cut
66
=cut
Lines 85-91 __PACKAGE__->add_columns( Link Here
85
  {
85
  {
86
    data_type => "timestamp",
86
    data_type => "timestamp",
87
    datetime_undef_if_invalid => 1,
87
    datetime_undef_if_invalid => 1,
88
    default_value => \"current_timestamp",
88
    default_value => "current_timestamp()",
89
    is_nullable => 0,
89
    is_nullable => 0,
90
  },
90
  },
91
);
91
);
Lines 103-110 __PACKAGE__->add_columns( Link Here
103
__PACKAGE__->set_primary_key("id");
103
__PACKAGE__->set_primary_key("id");
104
104
105
105
106
# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
106
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41
107
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vU9ROiVUwXc7jhKt728dRg
107
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:n+gwp4O5CrNj25L/ZA/65g
108
108
109
109
110
# You can replace this text with custom content, and it will be preserved on regeneration
110
# You can replace this text with custom content, and it will be preserved on regeneration
(-)a/admin/columns_settings.yml (+3 lines)
Lines 516-521 modules: Link Here
516
      account-fines:
516
      account-fines:
517
        -
517
        -
518
          columnname: date
518
          columnname: date
519
        -
520
          columnname: credit_number
521
          is_hidden: 1
519
        -
522
        -
520
          columnname: account_type
523
          columnname: account_type
521
        -
524
        -
(-)a/installer/data/mysql/atomicupdate/bug-19036.perl (+11 lines)
Line 0 Link Here
1
$DBversion = 'XXX';
2
if (CheckVersion($DBversion)) {
3
    unless (column_exists('accountlines', 'credit_number')) {
4
        $dbh->do('ALTER TABLE accountlines ADD COLUMN credit_number VARCHAR(20) NULL DEFAULT NULL COMMENT "autogenerated number for credits" AFTER debit_type_code');
5
    }
6
7
    $dbh->do('INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES(?, ?, ?, ?, ?)', undef, 'AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice');
8
9
    SetVersion($DBversion);
10
    print "Upgrade to $DBversion done (Bug 19036 - Add column accountlines.credit_number)\n";
11
}
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 2654-2659 CREATE TABLE `accountlines` ( Link Here
2654
  `description` LONGTEXT,
2654
  `description` LONGTEXT,
2655
  `credit_type_code` varchar(80) default NULL,
2655
  `credit_type_code` varchar(80) default NULL,
2656
  `debit_type_code` varchar(80) default NULL,
2656
  `debit_type_code` varchar(80) default NULL,
2657
  `credit_number` varchar(20) NULL DEFAULT NULL COMMENT 'autogenerated number for credits',
2657
  `status` varchar(16) default NULL,
2658
  `status` varchar(16) default NULL,
2658
  `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE
2659
  `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE
2659
  `amountoutstanding` decimal(28,6) default NULL,
2660
  `amountoutstanding` decimal(28,6) default NULL,
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 67-72 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
67
('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'),
67
('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'),
68
('autoBarcode','OFF','incremental|annual|hbyymmincr|EAN13|OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','Choice'),
68
('autoBarcode','OFF','incremental|annual|hbyymmincr|EAN13|OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','Choice'),
69
('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'),
69
('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'),
70
('AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'),
70
('AutoEmailOpacUser','0',NULL,'Sends notification emails containing new account details to patrons - when account is created.','YesNo'),
71
('AutoEmailOpacUser','0',NULL,'Sends notification emails containing new account details to patrons - when account is created.','YesNo'),
71
('AutoEmailPrimaryAddress','OFF','email|emailpro|B_email|cardnumber|OFF','Defines the default email address where \'Account Details\' emails are sent.','Choice'),
72
('AutoEmailPrimaryAddress','OFF','email|emailpro|B_email|cardnumber|OFF','Defines the default email address where \'Account Details\' emails are sent.','Choice'),
72
('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'),
73
('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounting.pref (+7 lines)
Lines 27-29 Accounting: Link Here
27
                yes: "Enable"
27
                yes: "Enable"
28
                no: "Disable"
28
                no: "Disable"
29
            - " the point of sale feature to allow anonymous transactions with the accounting system. (Requires UseCashRegisters)"
29
            - " the point of sale feature to allow anonymous transactions with the accounting system. (Requires UseCashRegisters)"
30
        -
31
            - pref: AutoCreditNumber
32
              choices:
33
                '': 'Do not automatically generate credit numbers'
34
                annual: 'Automatically generate credit numbers in the form <year>-0001'
35
                branchyyyymmincr: 'Automatically generate credit numbers in the form <branchcode>yyyymm0001'
36
                incremental: 'Automatically generate credit numbers in the form 1, 2, 3'
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (-1 / +3 lines)
Lines 44-49 Link Here
44
    <thead>
44
    <thead>
45
      <tr>
45
      <tr>
46
          <th class="title-string">Date</th>
46
          <th class="title-string">Date</th>
47
          <th>Credit number</th>
47
          <th>Account type</th>
48
          <th>Account type</th>
48
          <th>Description of charges</th>
49
          <th>Description of charges</th>
49
          <th>Barcode</th>
50
          <th>Barcode</th>
Lines 62-67 Link Here
62
63
63
   <tr>
64
   <tr>
64
   <td><span title="[% account.date | html %]">[% account.date |$KohaDates %]</span></td>
65
   <td><span title="[% account.date | html %]">[% account.date |$KohaDates %]</span></td>
66
        <td>[% account.credit_number | html %]</td>
65
        <td>[% PROCESS account_type_description account=account %]</td>
67
        <td>[% PROCESS account_type_description account=account %]</td>
66
      <td>
68
      <td>
67
        [%- IF account.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %]
69
        [%- IF account.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %]
Lines 96-102 Link Here
96
  [% END %]
98
  [% END %]
97
<tfoot>
99
<tfoot>
98
  <tr>
100
  <tr>
99
    <td colspan="9">Total due</td>
101
    <td colspan="10">Total due</td>
100
    [% IF ( totalcredit ) %]
102
    [% IF ( totalcredit ) %]
101
        <td class="credit" style="text-align: right;">[% total | $Price %]</td>
103
        <td class="credit" style="text-align: right;">[% total | $Price %]</td>
102
    [% ELSE %]
104
    [% ELSE %]
(-)a/t/db_dependent/Koha/Account.t (-2 / +49 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 11;
22
use Test::More tests => 12;
23
use Test::MockModule;
23
use Test::MockModule;
24
use Test::Exception;
24
use Test::Exception;
25
25
Lines 979-981 subtest 'Koha::Account::Line::apply() handles lost items' => sub { Link Here
979
979
980
    $schema->storage->txn_rollback;
980
    $schema->storage->txn_rollback;
981
};
981
};
982
- 
982
983
subtest 'Koha::Account::pay() generates credit number' => sub {
984
    plan tests => 34;
985
986
    $schema->storage->txn_begin;
987
988
    Koha::Account::Lines->delete();
989
990
    my $patron  = $builder->build_object( { class => 'Koha::Patrons' } );
991
    my $library = $builder->build_object( { class => 'Koha::Libraries' } );
992
    my $account = $patron->account;
993
994
    my $context = Test::MockModule->new('C4::Context');
995
    $context->mock( 'userenv', { branch => $library->id } );
996
997
    my $now = DateTime->now;
998
    my $year = $now->year;
999
    my $month = $now->month;
1000
    my ($accountlines_id, $accountline);
1001
1002
    t::lib::Mocks::mock_preference('AutoCreditNumber', '');
1003
    $accountlines_id = $account->pay({ amount => '1.00', library_id => $library->id });
1004
    $accountline = Koha::Account::Lines->find($accountlines_id);
1005
    is($accountline->credit_number, undef, 'No credit number is generated when syspref is off');
1006
1007
    t::lib::Mocks::mock_preference('AutoCreditNumber', 'incremental');
1008
    for my $i (1..11) {
1009
        $accountlines_id = $account->pay({ amount => '1.00', library_id => $library->id });
1010
        $accountline = Koha::Account::Lines->find($accountlines_id);
1011
        is($accountline->credit_number, $i);
1012
    }
1013
1014
    t::lib::Mocks::mock_preference('AutoCreditNumber', 'annual');
1015
    for my $i (1..11) {
1016
        $accountlines_id = $account->pay({ amount => '1.00', library_id => $library->id });
1017
        $accountline = Koha::Account::Lines->find($accountlines_id);
1018
        is($accountline->credit_number, sprintf('%s-%04d', $year, $i));
1019
    }
1020
1021
    t::lib::Mocks::mock_preference('AutoCreditNumber', 'branchyyyymmincr');
1022
    for my $i (1..11) {
1023
        $accountlines_id = $account->pay({ amount => '1.00', library_id => $library->id });
1024
        $accountline = Koha::Account::Lines->find($accountlines_id);
1025
        is($accountline->credit_number, sprintf('%s%d%02d%04d', $library->id, $year, $month, $i));
1026
    }
1027
1028
    $schema->storage->txn_rollback;
1029
};

Return to bug 19036