Bugzilla – Attachment 99302 Details for
Bug 19036
Number payment receipts / payment slips
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19036: Add ability to auto generate a number for account credits
Bug-19036-Add-ability-to-auto-generate-a-number-fo.patch (text/plain), 90.08 KB, created by
Julian Maurice
on 2020-02-20 09:02:59 UTC
(
hide
)
Description:
Bug 19036: Add ability to auto generate a number for account credits
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2020-02-20 09:02:59 UTC
Size:
90.08 KB
patch
obsolete
>From f82522428c1d8e78d4bd8628bb1d1d04bf892cf7 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 20 Feb 2020 10:02:38 +0100 >Subject: [PATCH] Bug 19036: Add ability to auto generate a number for account > credits >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >In some areas it's required to sequentially number payment slips / >receipts. > >This patch adds a database column accountlines.credit_number and a >system preference AutoCreditNumber to control how this number will be >generated. The following options are available: > >- Do not automatically generate credit numbers. > This is the current behaviour and the default syspref value. > >- Automatically generate credit numbers in the form <year>-0001 (annual) > >- Automatically generate credit numbers in the form > <branchcode>yyyymm0001 (branchyyyymmincr) > where <branchcode> is the branch where the user (staff member) is > logged in > >- Automatically generate credit numbers in the form 1, 2, 3 > (incremental) > >It also adds a column (hidden by default) in the table under >Transactions tab to display this number. > >Test plan: >0. Apply patch, run updatedatabase and update_dbix_class_files >1. Go to Admin » Column settings, and uncheck the 'hidden' box for > column credit_number in table account-fines. It will be easier for > testing >2. Create a manual credit for a borrower. Verify in Transactions tab > that this credit has no number generated >3. Change syspref 'AutoCreditNumber' to 'incremental' >4. Create more manual credits, and verify that the numbers generated are > 1, 2, 3, ... >5. Change syspref 'AutoCreditNumber' to 'annual' >6. Create more manual credits, and verify that the numbers generated are > '2020-0001', '2020-0002', ... >7. Change syspref to 'AutoCreditNumber' to 'branchyyyymmincr' >8. Create more manual credits, and verify that the numbers generated are > 'BRANCHA2020020001', 'BRANCHA2020020002', ... (assuming you are > connected to library BRANCHA, and it's February 2020) >9. Set library to another one, say BRANCHB >10. Create more manual credits, and verify that the numbers generated are > 'BRANCHB2020020001', 'BRANCHB2020020002', ... >11. Edit the letter ACCOUNT_CREDIT, and add [% account.credit_number %] > somewhere. Go back to Transactions tab and click on 'Print' for one > line that has a credit number. Make sure the number is there. >12. prove t/db_dependent/Koha/Account.t >--- > Koha/Account/Line.pm | 58 ++++++++++++++ > Koha/Schema/Result/AccountCreditType.pm | 12 ++- > Koha/Schema/Result/AccountDebitType.pm | 8 +- > Koha/Schema/Result/AccountOffset.pm | 8 +- > Koha/Schema/Result/Accountline.pm | 18 ++++- > Koha/Schema/Result/ActionLog.pm | 8 +- > Koha/Schema/Result/Aqbudget.pm | 8 +- > Koha/Schema/Result/AqinvoiceAdjustment.pm | 8 +- > Koha/Schema/Result/Aqorder.pm | 8 +- > Koha/Schema/Result/AqordersItem.pm | 8 +- > Koha/Schema/Result/AqordersTransfer.pm | 8 +- > Koha/Schema/Result/ArticleRequest.pm | 8 +- > Koha/Schema/Result/AuthHeader.pm | 8 +- > Koha/Schema/Result/Biblio.pm | 23 +++++- > Koha/Schema/Result/BiblioMetadata.pm | 8 +- > Koha/Schema/Result/Biblioitem.pm | 8 +- > Koha/Schema/Result/Borrower.pm | 16 ++-- > Koha/Schema/Result/BorrowerDebarment.pm | 8 +- > Koha/Schema/Result/BorrowerFile.pm | 8 +- > Koha/Schema/Result/BorrowerModification.pm | 8 +- > .../Schema/Result/BorrowerPasswordRecovery.pm | 8 +- > Koha/Schema/Result/Club.pm | 8 +- > Koha/Schema/Result/ClubEnrollment.pm | 8 +- > Koha/Schema/Result/ClubHold.pm | 8 +- > Koha/Schema/Result/ClubTemplate.pm | 8 +- > Koha/Schema/Result/Course.pm | 8 +- > Koha/Schema/Result/CourseItem.pm | 8 +- > Koha/Schema/Result/CourseReserve.pm | 8 +- > Koha/Schema/Result/CreatorBatch.pm | 8 +- > Koha/Schema/Result/Currency.pm | 8 +- > Koha/Schema/Result/Deletedbiblio.pm | 8 +- > Koha/Schema/Result/DeletedbiblioMetadata.pm | 8 +- > Koha/Schema/Result/Deletedbiblioitem.pm | 8 +- > Koha/Schema/Result/Deletedborrower.pm | 8 +- > Koha/Schema/Result/Deleteditem.pm | 8 +- > Koha/Schema/Result/Illcomment.pm | 8 +- > Koha/Schema/Result/Illrequest.pm | 8 +- > Koha/Schema/Result/ImportBatch.pm | 8 +- > Koha/Schema/Result/ImportRecord.pm | 8 +- > Koha/Schema/Result/Issue.pm | 8 +- > Koha/Schema/Result/Item.pm | 23 +++++- > Koha/Schema/Result/ItemsLastBorrower.pm | 8 +- > Koha/Schema/Result/LibraryGroup.pm | 8 +- > Koha/Schema/Result/Message.pm | 8 +- > Koha/Schema/Result/MessageQueue.pm | 8 +- > Koha/Schema/Result/MiscFile.pm | 8 +- > Koha/Schema/Result/NeedMergeAuthority.pm | 8 +- > Koha/Schema/Result/OldIssue.pm | 8 +- > Koha/Schema/Result/OldReserve.pm | 8 +- > Koha/Schema/Result/OpacNews.pm | 8 +- > Koha/Schema/Result/PendingOfflineOperation.pm | 8 +- > Koha/Schema/Result/Rating.pm | 8 +- > Koha/Schema/Result/RepeatableHoliday.pm | 13 ++- > Koha/Schema/Result/Reserve.pm | 8 +- > Koha/Schema/Result/SearchHistory.pm | 8 +- > Koha/Schema/Result/SearchMarcToField.pm | 20 ++--- > Koha/Schema/Result/Serial.pm | 11 +-- > Koha/Schema/Result/SpecialHoliday.pm | 13 ++- > Koha/Schema/Result/Subscriptionroutinglist.pm | 80 ++++++++----------- > Koha/Schema/Result/Suggestion.pm | 8 +- > Koha/Schema/Result/UploadedFile.pm | 8 +- > Koha/Schema/Result/Virtualshelfcontent.pm | 8 +- > Koha/Schema/Result/Virtualshelve.pm | 8 +- > Koha/Schema/Result/Zebraqueue.pm | 8 +- > admin/columns_settings.yml | 3 + > .../data/mysql/atomicupdate/bug-19036.perl | 11 +++ > installer/data/mysql/kohastructure.sql | 1 + > installer/data/mysql/sysprefs.sql | 1 + > .../modules/admin/preferences/accounting.pref | 7 ++ > .../prog/en/modules/members/boraccount.tt | 4 +- > t/db_dependent/Koha/Account.t | 50 +++++++++++- > 71 files changed, 479 insertions(+), 309 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug-19036.perl > >diff --git a/Koha/Account/Line.pm b/Koha/Account/Line.pm >index 1fac85d10c..c3d195a01c 100644 >--- a/Koha/Account/Line.pm >+++ b/Koha/Account/Line.pm >@@ -762,6 +762,64 @@ sub to_api_mapping { > }; > } > >+=head3 store >+ >+Specific store method to generate credit number before saving >+ >+=cut >+ >+sub store { >+ my ($self) = @_; >+ >+ my $AutoCreditNumber = C4::Context->preference('AutoCreditNumber'); >+ if ($AutoCreditNumber && !$self->in_storage && $self->is_credit && !$self->credit_number) { >+ my $rs = Koha::Database->new->schema->resultset($self->_type); >+ >+ if ($AutoCreditNumber eq 'incremental') { >+ my $max = $rs->search({ >+ credit_number => { -regexp => '^[0-9]+$' } >+ }, { >+ select => \'CAST(credit_number AS UNSIGNED)', >+ as => ['credit_number'], >+ })->get_column('credit_number')->max; >+ $max //= 0; >+ $self->credit_number($max + 1); >+ } elsif ($AutoCreditNumber eq 'annual') { >+ my $now = DateTime->now; >+ my $prefix = sprintf('%d-', $now->year); >+ my $max = $rs->search({ >+ -and => [ >+ credit_number => { -regexp => '[0-9]{4}$' }, >+ credit_number => { -like => "$prefix%" }, >+ ], >+ })->get_column('credit_number')->max; >+ $max //= $prefix . '0000'; >+ my $incr = substr($max, length $prefix); >+ $self->credit_number(sprintf('%s%04d', $prefix, $incr + 1)); >+ } elsif ($AutoCreditNumber eq 'branchyyyymmincr') { >+ my $userenv = C4::Context->userenv; >+ if ($userenv) { >+ my $branch = $userenv->{branch}; >+ my $now = DateTime->now; >+ my $prefix = sprintf('%s%d%02d', $branch, $now->year, $now->month); >+ my $pattern = $prefix; >+ $pattern =~ s/([\?%_])/\\$1/g; >+ my $max = $rs->search({ >+ -and => [ >+ credit_number => { -regexp => '[0-9]{4}$' }, >+ credit_number => { -like => "$pattern%" }, >+ ], >+ })->get_column('credit_number')->max; >+ $max //= $prefix . '0000'; >+ my $incr = substr($max, length $prefix); >+ $self->credit_number(sprintf('%s%04d', $prefix, $incr + 1)); >+ } >+ } >+ } >+ >+ return $self->SUPER::store(); >+} >+ > =head2 Internal methods > > =cut >diff --git a/Koha/Schema/Result/AccountCreditType.pm b/Koha/Schema/Result/AccountCreditType.pm >index c81d27f6ec..732f618347 100644 >--- a/Koha/Schema/Result/AccountCreditType.pm >+++ b/Koha/Schema/Result/AccountCreditType.pm >@@ -47,6 +47,12 @@ __PACKAGE__->table("account_credit_types"); > default_value: 0 > is_nullable: 0 > >+=head2 archived >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ > =cut > > __PACKAGE__->add_columns( >@@ -58,6 +64,8 @@ __PACKAGE__->add_columns( > { data_type => "tinyint", default_value => 1, is_nullable => 0 }, > "is_system", > { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ "archived", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, > ); > > =head1 PRIMARY KEY >@@ -105,8 +113,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-14 09:59:52 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uycu/23b681kWHNX+/gNiw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9tQSTkjAGqGikbWnbBhlgw > > __PACKAGE__->add_columns( > '+is_system' => { is_boolean => 1 } >diff --git a/Koha/Schema/Result/AccountDebitType.pm b/Koha/Schema/Result/AccountDebitType.pm >index 8772813c2e..9752d00975 100644 >--- a/Koha/Schema/Result/AccountDebitType.pm >+++ b/Koha/Schema/Result/AccountDebitType.pm >@@ -45,7 +45,7 @@ __PACKAGE__->table("account_debit_types"); > > data_type: 'tinyint' > default_value: 0 >- is_nullable: 0 >+ is_nullable: 1 > > =head2 default_amount > >@@ -75,7 +75,7 @@ __PACKAGE__->add_columns( > "can_be_invoiced", > { data_type => "tinyint", default_value => 1, is_nullable => 0 }, > "can_be_sold", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+ { data_type => "tinyint", default_value => 0, is_nullable => 1 }, > "default_amount", > { data_type => "decimal", is_nullable => 1, size => [28, 6] }, > "is_system", >@@ -129,8 +129,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-17 12:22:04 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8FIMJZ+JAmqa+Dx7oymBjw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qZfg9L2ysl2pJUiaBLwUFg > > __PACKAGE__->add_columns( > '+is_system' => { is_boolean => 1 } >diff --git a/Koha/Schema/Result/AccountOffset.pm b/Koha/Schema/Result/AccountOffset.pm >index 02751ae83a..1397e86046 100644 >--- a/Koha/Schema/Result/AccountOffset.pm >+++ b/Koha/Schema/Result/AccountOffset.pm >@@ -58,7 +58,7 @@ __PACKAGE__->table("account_offsets"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -78,7 +78,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -153,8 +153,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-20 16:27:04 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tPPrIug2c7PbDO7LCxCJAA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mfS1B79dpfPc8VGdjT1+YA > > sub koha_object_class { > 'Koha::Account::Offset'; >diff --git a/Koha/Schema/Result/Accountline.pm b/Koha/Schema/Result/Accountline.pm >index 1d455e655c..613969d48f 100644 >--- a/Koha/Schema/Result/Accountline.pm >+++ b/Koha/Schema/Result/Accountline.pm >@@ -77,6 +77,14 @@ __PACKAGE__->table("accountlines"); > is_nullable: 1 > size: 80 > >+=head2 credit_number >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 20 >+ >+autogenerated number for credits >+ > =head2 status > > data_type: 'varchar' >@@ -99,7 +107,7 @@ __PACKAGE__->table("accountlines"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 note >@@ -153,6 +161,8 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 }, > "debit_type_code", > { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 80 }, >+ "credit_number", >+ { data_type => "varchar", is_nullable => 1, size => 20 }, > "status", > { data_type => "varchar", is_nullable => 1, size => 16 }, > "payment_type", >@@ -163,7 +173,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "note", >@@ -363,8 +373,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-24 16:33:42 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q4Ahb8xIxAsjT/aF9yjrdQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uFM5Kclu6Vw6ui+1A/RXsQ > > sub koha_objects_class { > 'Koha::Account::Lines'; >diff --git a/Koha/Schema/Result/ActionLog.pm b/Koha/Schema/Result/ActionLog.pm >index 78236ea9eb..83ab784fe1 100644 >--- a/Koha/Schema/Result/ActionLog.pm >+++ b/Koha/Schema/Result/ActionLog.pm >@@ -33,7 +33,7 @@ __PACKAGE__->table("action_logs"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 user >@@ -77,7 +77,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "user", >@@ -107,8 +107,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("action_id"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VVXBchLYkj+S+lLhl7bKgw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TmMQtaJ4596Tj8mYKvZffA > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Aqbudget.pm b/Koha/Schema/Result/Aqbudget.pm >index f8f05f49c1..91580878c8 100644 >--- a/Koha/Schema/Result/Aqbudget.pm >+++ b/Koha/Schema/Result/Aqbudget.pm >@@ -82,7 +82,7 @@ __PACKAGE__->table("aqbudgets"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 budget_period_id >@@ -153,7 +153,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "budget_period_id", >@@ -298,8 +298,8 @@ Composing rels: L</aqbudgetborrowers> -> borrowernumber > __PACKAGE__->many_to_many("borrowernumbers", "aqbudgetborrowers", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-16 13:50:45 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zB7ox8a4KdDGq5fsbQfLGQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wbXfOXiR6q7jVleJyzsLWQ > > > sub koha_object_class { >diff --git a/Koha/Schema/Result/AqinvoiceAdjustment.pm b/Koha/Schema/Result/AqinvoiceAdjustment.pm >index 16bc45acb2..5e21bdaef6 100644 >--- a/Koha/Schema/Result/AqinvoiceAdjustment.pm >+++ b/Koha/Schema/Result/AqinvoiceAdjustment.pm >@@ -68,7 +68,7 @@ __PACKAGE__->table("aqinvoice_adjustments"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -92,7 +92,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -147,8 +147,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-07-19 17:32:57 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jl0qxkZWVs2D1pi3kaRjpg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:V0/9Hi5Uc9L2AnWcdzDn4g > > sub koha_object_class { > 'Koha::Acquisition::Invoice::Adjustment'; >diff --git a/Koha/Schema/Result/Aqorder.pm b/Koha/Schema/Result/Aqorder.pm >index a6ab12cf6a..16e3a15055 100644 >--- a/Koha/Schema/Result/Aqorder.pm >+++ b/Koha/Schema/Result/Aqorder.pm >@@ -143,7 +143,7 @@ __PACKAGE__->table("aqorders"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 rrp >@@ -371,7 +371,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "rrp", >@@ -661,8 +661,8 @@ Composing rels: L</aqorder_users> -> borrowernumber > __PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-08-31 11:51:37 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GQEXetlivZm7buQohl8m4A >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xXgooImZVlFvUzSJXHPWhQ > > __PACKAGE__->belongs_to( > "basket", >diff --git a/Koha/Schema/Result/AqordersItem.pm b/Koha/Schema/Result/AqordersItem.pm >index ac99f2e10c..69758bb4f7 100644 >--- a/Koha/Schema/Result/AqordersItem.pm >+++ b/Koha/Schema/Result/AqordersItem.pm >@@ -38,7 +38,7 @@ __PACKAGE__->table("aqorders_items"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -52,7 +52,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -87,8 +87,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hvDuLTY3idYc1ujykNDrPQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FLVvGzsei1T0NsB5+ubnXw > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/AqordersTransfer.pm b/Koha/Schema/Result/AqordersTransfer.pm >index 68008babda..77e95d2428 100644 >--- a/Koha/Schema/Result/AqordersTransfer.pm >+++ b/Koha/Schema/Result/AqordersTransfer.pm >@@ -39,7 +39,7 @@ __PACKAGE__->table("aqorders_transfers"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -53,7 +53,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -127,8 +127,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z6+vESlzZKjZloNvrEHpxA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FqlytCU3bCmEDqWkOm2uuw > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/ArticleRequest.pm b/Koha/Schema/Result/ArticleRequest.pm >index e26f5c4304..bc4e348ad9 100644 >--- a/Koha/Schema/Result/ArticleRequest.pm >+++ b/Koha/Schema/Result/ArticleRequest.pm >@@ -110,7 +110,7 @@ __PACKAGE__->table("article_requests"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 updated_on >@@ -161,7 +161,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "updated_on", >@@ -257,8 +257,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BOBB3vld8wY75u45YldoEg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DZfgssb5lWBwXAQD4yFX2g > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/AuthHeader.pm b/Koha/Schema/Result/AuthHeader.pm >index d406e27128..a6f0e5b0c1 100644 >--- a/Koha/Schema/Result/AuthHeader.pm >+++ b/Koha/Schema/Result/AuthHeader.pm >@@ -47,7 +47,7 @@ __PACKAGE__->table("auth_header"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 origincode >@@ -94,7 +94,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "origincode", >@@ -122,8 +122,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("authid"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kHEdfMFYFtn3sQ20qsdFyg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:78YWjMUi8plOllaNMWzmuw > > sub koha_object_class { > 'Koha::Authority'; >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index 7c66b1dc03..c6dd302fe1 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -95,7 +95,7 @@ __PACKAGE__->table("biblio"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 datecreated >@@ -142,7 +142,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "datecreated", >@@ -285,6 +285,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 items_bundle >+ >+Type: might_have >+ >+Related object: L<Koha::Schema::Result::ItemsBundle> >+ >+=cut >+ >+__PACKAGE__->might_have( >+ "items_bundle", >+ "Koha::Schema::Result::ItemsBundle", >+ { "foreign.biblionumber" => "self.biblionumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 old_reserves > > Type: has_many >@@ -406,8 +421,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:otCex8qzJmZyc+JXpKNdpQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:swuobxQgc+thlB/K+3QZeA > > > __PACKAGE__->has_one( >diff --git a/Koha/Schema/Result/BiblioMetadata.pm b/Koha/Schema/Result/BiblioMetadata.pm >index aa1a7b25ee..1993ee4762 100644 >--- a/Koha/Schema/Result/BiblioMetadata.pm >+++ b/Koha/Schema/Result/BiblioMetadata.pm >@@ -56,7 +56,7 @@ __PACKAGE__->table("biblio_metadata"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -76,7 +76,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -132,8 +132,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-30 11:34:16 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJk/YOw8Y/QRmmPPL3G5qQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5mMqx4y01pZfu8YrNvXDTQ > > sub koha_object_class { > 'Koha::Biblio::Metadata'; >diff --git a/Koha/Schema/Result/Biblioitem.pm b/Koha/Schema/Result/Biblioitem.pm >index 49e52e7678..804d9d2c0a 100644 >--- a/Koha/Schema/Result/Biblioitem.pm >+++ b/Koha/Schema/Result/Biblioitem.pm >@@ -118,7 +118,7 @@ __PACKAGE__->table("biblioitems"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 illus >@@ -248,7 +248,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "illus", >@@ -326,8 +326,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ogVRTKNaUQSI3BE2xC2lww >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Anhy+pvrQlPufkbe5qsJsQ > > __PACKAGE__->belongs_to( biblio => "Koha::Schema::Result::Biblio", "biblionumber" ); > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index f7224cc299..41fc27ed72 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -425,7 +425,7 @@ __PACKAGE__->table("borrowers"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 lastseen >@@ -640,7 +640,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "lastseen", >@@ -1429,17 +1429,17 @@ __PACKAGE__->belongs_to( > }, > ); > >-=head2 subscriptionroutinglists >+=head2 subscriptionroutings > > Type: has_many > >-Related object: L<Koha::Schema::Result::Subscriptionroutinglist> >+Related object: L<Koha::Schema::Result::Subscriptionrouting> > > =cut > > __PACKAGE__->has_many( >- "subscriptionroutinglists", >- "Koha::Schema::Result::Subscriptionroutinglist", >+ "subscriptionroutings", >+ "Koha::Schema::Result::Subscriptionrouting", > { "foreign.borrowernumber" => "self.borrowernumber" }, > { cascade_copy => 0, cascade_delete => 0 }, > ); >@@ -1635,8 +1635,8 @@ Composing rels: L</aqorder_users> -> ordernumber > __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-10 14:31:00 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GjJLIOViIFRm185Yjl9vYA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9Ekh2ybmnaY+m5FxB7U6mQ > > __PACKAGE__->add_columns( > '+anonymized' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/BorrowerDebarment.pm b/Koha/Schema/Result/BorrowerDebarment.pm >index 0a603de58a..74194f6195 100644 >--- a/Koha/Schema/Result/BorrowerDebarment.pm >+++ b/Koha/Schema/Result/BorrowerDebarment.pm >@@ -62,7 +62,7 @@ __PACKAGE__->table("borrower_debarments"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 updated >@@ -95,7 +95,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "updated", >@@ -136,8 +136,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:J9J1ReRLqhVasOQXvde2Uw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tOAoFYn0a6MZgtvoFS15xQ > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/BorrowerFile.pm b/Koha/Schema/Result/BorrowerFile.pm >index 6f0982d519..b393a04091 100644 >--- a/Koha/Schema/Result/BorrowerFile.pm >+++ b/Koha/Schema/Result/BorrowerFile.pm >@@ -62,7 +62,7 @@ __PACKAGE__->table("borrower_files"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -84,7 +84,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -119,8 +119,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sbkf7bvdO4CgmiBLgIwYQg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CRCwGgDaSvO7nc4Nkyb3Cw > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm >index 3db708d3fc..3bcbca945b 100644 >--- a/Koha/Schema/Result/BorrowerModification.pm >+++ b/Koha/Schema/Result/BorrowerModification.pm >@@ -27,7 +27,7 @@ __PACKAGE__->table("borrower_modifications"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 verification_token >@@ -428,7 +428,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "verification_token", >@@ -610,8 +610,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("verification_token", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-07-22 16:54:42 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jkZUTN+mGIdp8ySV0BYNTw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kwyyiaDxYxdTaYEdcEX8yg > > sub koha_object_class { > 'Koha::Patron::Modification'; >diff --git a/Koha/Schema/Result/BorrowerPasswordRecovery.pm b/Koha/Schema/Result/BorrowerPasswordRecovery.pm >index c7f567d102..e2a046a469 100644 >--- a/Koha/Schema/Result/BorrowerPasswordRecovery.pm >+++ b/Koha/Schema/Result/BorrowerPasswordRecovery.pm >@@ -38,7 +38,7 @@ __PACKAGE__->table("borrower_password_recovery"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -52,7 +52,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -70,8 +70,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2016-01-22 10:16:52 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c4ehAGqOD6YHpGg85BX8YQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rQvacObXzIDRx+cnDgX6uA > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Club.pm b/Koha/Schema/Result/Club.pm >index 7710a752d0..ef4d31847f 100644 >--- a/Koha/Schema/Result/Club.pm >+++ b/Koha/Schema/Result/Club.pm >@@ -68,7 +68,7 @@ __PACKAGE__->table("clubs"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 date_updated >@@ -98,7 +98,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "date_updated", >@@ -204,8 +204,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WbB7PSSU4xaszsKe9Eacqw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q0tsXoANaJ0laHSyzhvWBg > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/ClubEnrollment.pm b/Koha/Schema/Result/ClubEnrollment.pm >index f428a5da6f..4f7edc773e 100644 >--- a/Koha/Schema/Result/ClubEnrollment.pm >+++ b/Koha/Schema/Result/ClubEnrollment.pm >@@ -45,7 +45,7 @@ __PACKAGE__->table("club_enrollments"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 date_canceled >@@ -86,7 +86,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "date_canceled", >@@ -191,8 +191,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-12 17:59:47 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ih/HQM4KIRDZ0ESXVR9FwA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BGc4RqbBSCR6uniY1/ra4Q > > sub koha_object_class { > 'Koha::Club::Enrollment'; >diff --git a/Koha/Schema/Result/ClubHold.pm b/Koha/Schema/Result/ClubHold.pm >index fca4b51046..21a6590568 100644 >--- a/Koha/Schema/Result/ClubHold.pm >+++ b/Koha/Schema/Result/ClubHold.pm >@@ -51,7 +51,7 @@ __PACKAGE__->table("club_holds"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -69,7 +69,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -154,8 +154,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:47 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FYGXVx1P2R+dGbeP1xshPA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ccFlKbTvIRs4u01E8qqnRg > > sub koha_objects_class { > 'Koha::Club::Holds'; >diff --git a/Koha/Schema/Result/ClubTemplate.pm b/Koha/Schema/Result/ClubTemplate.pm >index bbc5f49a5f..c752fb7142 100644 >--- a/Koha/Schema/Result/ClubTemplate.pm >+++ b/Koha/Schema/Result/ClubTemplate.pm >@@ -62,7 +62,7 @@ __PACKAGE__->table("club_templates"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 date_updated >@@ -96,7 +96,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "date_updated", >@@ -189,8 +189,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1UuejI9kkTb9eeNKvSLAQQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YUzYhnCe19rp6VL0cJZQvA > > sub koha_object_class { > 'Koha::Club::Template'; >diff --git a/Koha/Schema/Result/Course.pm b/Koha/Schema/Result/Course.pm >index cd1ede28e3..8854161df4 100644 >--- a/Koha/Schema/Result/Course.pm >+++ b/Koha/Schema/Result/Course.pm >@@ -86,7 +86,7 @@ __PACKAGE__->table("courses"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -121,7 +121,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -181,8 +181,8 @@ Composing rels: L</course_instructors> -> borrowernumber > __PACKAGE__->many_to_many("borrowernumbers", "course_instructors", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o0EBOuJCHxH5IG/PgsJfxg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yeukLUSqlLJNVHxKDC7HOQ > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/CourseItem.pm b/Koha/Schema/Result/CourseItem.pm >index 5df7ec6034..f8418b923f 100644 >--- a/Koha/Schema/Result/CourseItem.pm >+++ b/Koha/Schema/Result/CourseItem.pm >@@ -71,7 +71,7 @@ __PACKAGE__->table("course_items"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -100,7 +100,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -184,8 +184,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-09-26 16:15:09 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0hBp2R7AMxgHLLZcG/676w >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VcUbKGA6rEwIg4cRse4fEg > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/CourseReserve.pm b/Koha/Schema/Result/CourseReserve.pm >index 080d699cba..abdbb5129a 100644 >--- a/Koha/Schema/Result/CourseReserve.pm >+++ b/Koha/Schema/Result/CourseReserve.pm >@@ -55,7 +55,7 @@ __PACKAGE__->table("course_reserves"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -75,7 +75,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -141,8 +141,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8SDdUrbxKuAwp6rgn85RmA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ocHPOi2tze1PQCzzw9qY5w > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/CreatorBatch.pm b/Koha/Schema/Result/CreatorBatch.pm >index 7f6f07faad..f9e0ca4d32 100644 >--- a/Koha/Schema/Result/CreatorBatch.pm >+++ b/Koha/Schema/Result/CreatorBatch.pm >@@ -56,7 +56,7 @@ __PACKAGE__->table("creator_batches"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 branch_code >@@ -91,7 +91,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "branch_code", >@@ -181,8 +181,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-24 17:34:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5SOMkaJ6IxGtnqtPVFpNtg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g3vD+wvEsI0GBWyvSMEFqg > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Currency.pm b/Koha/Schema/Result/Currency.pm >index 720fa5ac59..e9cd2dfcca 100644 >--- a/Koha/Schema/Result/Currency.pm >+++ b/Koha/Schema/Result/Currency.pm >@@ -46,7 +46,7 @@ __PACKAGE__->table("currency"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 rate >@@ -85,7 +85,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "rate", >@@ -158,8 +158,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-01 14:23:58 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PnJEcCgrM1Edf99phWFdyQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YaSxkG7ZGqegVkIif7NDjQ > > > sub koha_object_class { >diff --git a/Koha/Schema/Result/Deletedbiblio.pm b/Koha/Schema/Result/Deletedbiblio.pm >index 5d02066493..b53954c9ac 100644 >--- a/Koha/Schema/Result/Deletedbiblio.pm >+++ b/Koha/Schema/Result/Deletedbiblio.pm >@@ -95,7 +95,7 @@ __PACKAGE__->table("deletedbiblio"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 datecreated >@@ -142,7 +142,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "datecreated", >@@ -181,8 +181,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-08-05 13:53:34 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FQaznWmkfR2Ge5NG8lDmSw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9Xm2vadUVskBiHj/Ex84Sg > > sub koha_objects_class { > 'Koha::Old::Biblios'; >diff --git a/Koha/Schema/Result/DeletedbiblioMetadata.pm b/Koha/Schema/Result/DeletedbiblioMetadata.pm >index 17406b9ca4..ddeb091d67 100644 >--- a/Koha/Schema/Result/DeletedbiblioMetadata.pm >+++ b/Koha/Schema/Result/DeletedbiblioMetadata.pm >@@ -56,7 +56,7 @@ __PACKAGE__->table("deletedbiblio_metadata"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -76,7 +76,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -132,8 +132,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-30 11:34:16 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JCOh+FSSTgPlC8lMJOdOOA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nIqHgwWZQKbGDIGTwNcR9w > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Deletedbiblioitem.pm b/Koha/Schema/Result/Deletedbiblioitem.pm >index e2849ecd99..021422ea80 100644 >--- a/Koha/Schema/Result/Deletedbiblioitem.pm >+++ b/Koha/Schema/Result/Deletedbiblioitem.pm >@@ -117,7 +117,7 @@ __PACKAGE__->table("deletedbiblioitems"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 illus >@@ -242,7 +242,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "illus", >@@ -288,8 +288,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("biblioitemnumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QLYBa1Ea8Jau2Wy6U+wyQw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A8v0vpPFLetnTSuMAb6SYA > > sub koha_objects_class { > 'Koha::Old::Biblioitems'; >diff --git a/Koha/Schema/Result/Deletedborrower.pm b/Koha/Schema/Result/Deletedborrower.pm >index 1ba0873e2f..9417d819dd 100644 >--- a/Koha/Schema/Result/Deletedborrower.pm >+++ b/Koha/Schema/Result/Deletedborrower.pm >@@ -422,7 +422,7 @@ __PACKAGE__->table("deletedborrowers"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 lastseen >@@ -625,7 +625,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "lastseen", >@@ -650,8 +650,8 @@ __PACKAGE__->add_columns( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-05-22 04:33:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zK1jC6Wawwj8B2ch9KFByw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4FJOURzbg7/amSUXECLJsQ > > sub koha_objects_class { > 'Koha::Old::Patrons'; >diff --git a/Koha/Schema/Result/Deleteditem.pm b/Koha/Schema/Result/Deleteditem.pm >index 70a3e36eb0..352cfc060e 100644 >--- a/Koha/Schema/Result/Deleteditem.pm >+++ b/Koha/Schema/Result/Deleteditem.pm >@@ -198,7 +198,7 @@ __PACKAGE__->table("deleteditems"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 location >@@ -360,7 +360,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "location", >@@ -406,8 +406,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("itemnumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-17 10:42:24 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1+z3OHx5OpOcP82k8vyAaA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d5Keiv9fRJlOT27yRtMX2w > > sub koha_objects_class { > 'Koha::Old::Items'; >diff --git a/Koha/Schema/Result/Illcomment.pm b/Koha/Schema/Result/Illcomment.pm >index 04a04370c4..9793a6cd50 100644 >--- a/Koha/Schema/Result/Illcomment.pm >+++ b/Koha/Schema/Result/Illcomment.pm >@@ -51,7 +51,7 @@ __PACKAGE__->table("illcomments"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -74,7 +74,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -129,8 +129,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-26 19:57:17 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JJC9ohn0V61+WzMppDKUJw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:taV0nPCmNLIflefOr5YMKQ > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Illrequest.pm b/Koha/Schema/Result/Illrequest.pm >index 4260a8d2df..b0db18f502 100644 >--- a/Koha/Schema/Result/Illrequest.pm >+++ b/Koha/Schema/Result/Illrequest.pm >@@ -77,7 +77,7 @@ __PACKAGE__->table("illrequests"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 completed >@@ -160,7 +160,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "completed", >@@ -283,8 +283,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-02-22 14:32:49 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I6fY8XRfEmRxSzOeVT9Krw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:drrFZCJQY+kKFxek3IBvUQ > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/ImportBatch.pm b/Koha/Schema/Result/ImportBatch.pm >index c2fd81c79a..abfa59f9f4 100644 >--- a/Koha/Schema/Result/ImportBatch.pm >+++ b/Koha/Schema/Result/ImportBatch.pm >@@ -61,7 +61,7 @@ __PACKAGE__->table("import_batches"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 overlay_action >@@ -136,7 +136,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "overlay_action", >@@ -235,8 +235,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:41giNJCRD9WXC4IGO/1D3A >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GmVg9yizOZg8hY8RKoKtEQ > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/ImportRecord.pm b/Koha/Schema/Result/ImportRecord.pm >index 8499e4bb86..d112808d99 100644 >--- a/Koha/Schema/Result/ImportRecord.pm >+++ b/Koha/Schema/Result/ImportRecord.pm >@@ -51,7 +51,7 @@ __PACKAGE__->table("import_records"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 import_date >@@ -123,7 +123,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "import_date", >@@ -262,8 +262,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-04-18 10:50:48 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bqIAQzhgioWtBWU8zFdtjw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jKLkfH2mLNE5UpMT/ZnbEA > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm >index 8bb16b6b92..447eab684a 100644 >--- a/Koha/Schema/Result/Issue.pm >+++ b/Koha/Schema/Result/Issue.pm >@@ -87,7 +87,7 @@ __PACKAGE__->table("issues"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 issuedate >@@ -157,7 +157,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "issuedate", >@@ -264,8 +264,8 @@ __PACKAGE__->might_have( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-31 12:18:38 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QVmFa5b0Pe5OhUI92n9kzQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uu7Hv8HiASn3H6me2YHx1A > > __PACKAGE__->add_columns( > '+auto_renew' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index 58cddf4502..9657b7e561 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -202,7 +202,7 @@ __PACKAGE__->table("items"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 location >@@ -374,7 +374,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "location", >@@ -625,6 +625,21 @@ __PACKAGE__->might_have( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 items_bundle_item >+ >+Type: might_have >+ >+Related object: L<Koha::Schema::Result::ItemsBundleItem> >+ >+=cut >+ >+__PACKAGE__->might_have( >+ "items_bundle_item", >+ "Koha::Schema::Result::ItemsBundleItem", >+ { "foreign.itemnumber" => "self.itemnumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 items_last_borrower > > Type: might_have >@@ -746,8 +761,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-17 10:42:24 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CcrMhgq+PQ1MHV6jZEN8wA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2OAwCv4uG2OqDkHGrMQlbw > > __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); > >diff --git a/Koha/Schema/Result/ItemsLastBorrower.pm b/Koha/Schema/Result/ItemsLastBorrower.pm >index 1a97cd7673..c30e4828f9 100644 >--- a/Koha/Schema/Result/ItemsLastBorrower.pm >+++ b/Koha/Schema/Result/ItemsLastBorrower.pm >@@ -45,7 +45,7 @@ __PACKAGE__->table("items_last_borrower"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -61,7 +61,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -125,8 +125,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-10-02 12:33:33 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ByHKNZCEz4a1AqTnOJgUWA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uKe825x+YA0n7O8HxdC0BA > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/LibraryGroup.pm b/Koha/Schema/Result/LibraryGroup.pm >index 6ffb7a8ac4..e9feac3297 100644 >--- a/Koha/Schema/Result/LibraryGroup.pm >+++ b/Koha/Schema/Result/LibraryGroup.pm >@@ -87,7 +87,7 @@ __PACKAGE__->table("library_groups"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -121,7 +121,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -224,8 +224,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-30 15:43:39 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qg0Ckj0ZBRjSaQgEcvxSZA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cgoo1VFsYRC2VPqVu613NQ > > sub koha_object_class { > 'Koha::Library::Group'; >diff --git a/Koha/Schema/Result/Message.pm b/Koha/Schema/Result/Message.pm >index 4f4237ed6b..a1a624347c 100644 >--- a/Koha/Schema/Result/Message.pm >+++ b/Koha/Schema/Result/Message.pm >@@ -56,7 +56,7 @@ __PACKAGE__->table("messages"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 manager_id >@@ -82,7 +82,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "manager_id", >@@ -139,8 +139,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-02-15 13:15:09 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kYM+0CFPm/wdNp7EosdlRw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Czgoljvkzbs8ta0hXTxqMA > > sub koha_object_class { > 'Koha::Patron::Message'; >diff --git a/Koha/Schema/Result/MessageQueue.pm b/Koha/Schema/Result/MessageQueue.pm >index c8d0d5a2c3..372a660dbb 100644 >--- a/Koha/Schema/Result/MessageQueue.pm >+++ b/Koha/Schema/Result/MessageQueue.pm >@@ -80,7 +80,7 @@ __PACKAGE__->table("message_queue"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 to_address >@@ -132,7 +132,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "to_address", >@@ -193,8 +193,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-05 14:26:34 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fSWIVVJGliKtqQaNbmZKYQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0L+d9pWy9VZz2uwJsQNB7Q > > sub koha_object_class { > 'Koha::Notice::Message'; >diff --git a/Koha/Schema/Result/MiscFile.pm b/Koha/Schema/Result/MiscFile.pm >index c194ce0fa0..04ec59a9a6 100644 >--- a/Koha/Schema/Result/MiscFile.pm >+++ b/Koha/Schema/Result/MiscFile.pm >@@ -67,7 +67,7 @@ __PACKAGE__->table("misc_files"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -91,7 +91,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -109,8 +109,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("file_id"); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2014-05-25 21:17:02 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VWGyKXxK0dqymMsEGCjJxg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QPuF+Cb4BVGp2rqB18JWnw > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/NeedMergeAuthority.pm b/Koha/Schema/Result/NeedMergeAuthority.pm >index a4e4795e11..d5fd74890e 100644 >--- a/Koha/Schema/Result/NeedMergeAuthority.pm >+++ b/Koha/Schema/Result/NeedMergeAuthority.pm >@@ -48,7 +48,7 @@ __PACKAGE__->table("need_merge_authorities"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 done >@@ -72,7 +72,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "done", >@@ -92,8 +92,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("id"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7LzwIYvExKvNgr8/HDZlsg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m8L0rNMzZk0cLGj2LFEDwA > > sub koha_object_class { > 'Koha::Authority::MergeRequest'; >diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm >index f1ff5c2fa6..3209ef05fc 100644 >--- a/Koha/Schema/Result/OldIssue.pm >+++ b/Koha/Schema/Result/OldIssue.pm >@@ -86,7 +86,7 @@ __PACKAGE__->table("old_issues"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 issuedate >@@ -156,7 +156,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "issuedate", >@@ -234,8 +234,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-04-10 19:55:44 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E2N2paWcCHg916100ry+2A >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aRRi1sRKr7IguXs8IvIoDw > > __PACKAGE__->add_columns( > '+auto_renew' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/OldReserve.pm b/Koha/Schema/Result/OldReserve.pm >index de9fc6cb27..c09d5db323 100644 >--- a/Koha/Schema/Result/OldReserve.pm >+++ b/Koha/Schema/Result/OldReserve.pm >@@ -90,7 +90,7 @@ __PACKAGE__->table("old_reserves"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 itemnumber >@@ -172,7 +172,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "itemnumber", >@@ -297,8 +297,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-06-17 07:24:39 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZgGAW7ODBby3hGNJ41eeMA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I4D3WJSvd7KTyWF+9M4D4w > > sub koha_object_class { > 'Koha::Old::Hold'; >diff --git a/Koha/Schema/Result/OpacNews.pm b/Koha/Schema/Result/OpacNews.pm >index c3906da824..6a46677ddd 100644 >--- a/Koha/Schema/Result/OpacNews.pm >+++ b/Koha/Schema/Result/OpacNews.pm >@@ -60,7 +60,7 @@ __PACKAGE__->table("opac_news"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 expirationdate >@@ -102,7 +102,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "expirationdate", >@@ -168,8 +168,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gApTRM/dF6uZSMYyvkt4OQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gkBxrFM46U1oEQDXahQxMA > > sub koha_object_class { > 'Koha::NewsItem'; >diff --git a/Koha/Schema/Result/PendingOfflineOperation.pm b/Koha/Schema/Result/PendingOfflineOperation.pm >index 37e791880d..b06055550f 100644 >--- a/Koha/Schema/Result/PendingOfflineOperation.pm >+++ b/Koha/Schema/Result/PendingOfflineOperation.pm >@@ -45,7 +45,7 @@ __PACKAGE__->table("pending_offline_operations"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 action >@@ -85,7 +85,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "action", >@@ -111,8 +111,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("operationid"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-27 13:24:06 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EA2gwvRWvFVCPyIB94jCdw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kd5wVqCpZO7PRNMlAvSeJw > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Rating.pm b/Koha/Schema/Result/Rating.pm >index a8fe6e436b..672d3f3901 100644 >--- a/Koha/Schema/Result/Rating.pm >+++ b/Koha/Schema/Result/Rating.pm >@@ -44,7 +44,7 @@ __PACKAGE__->table("ratings"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -60,7 +60,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -112,8 +112,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YT3jPQbA2TBuOuUXfEt7gQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:01Smg8hro7ZNrATvWSxsVQ > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/RepeatableHoliday.pm b/Koha/Schema/Result/RepeatableHoliday.pm >index f89f10a2f4..03031a37c0 100644 >--- a/Koha/Schema/Result/RepeatableHoliday.pm >+++ b/Koha/Schema/Result/RepeatableHoliday.pm >@@ -32,6 +32,7 @@ __PACKAGE__->table("repeatable_holidays"); > =head2 branchcode > > data_type: 'varchar' >+ default_value: (empty string) > is_foreign_key: 1 > is_nullable: 0 > size: 10 >@@ -69,7 +70,13 @@ __PACKAGE__->add_columns( > "id", > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, > "branchcode", >- { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, >+ { >+ data_type => "varchar", >+ default_value => "", >+ is_foreign_key => 1, >+ is_nullable => 0, >+ size => 10, >+ }, > "weekday", > { data_type => "smallint", is_nullable => 1 }, > "day", >@@ -112,8 +119,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-20 13:57:27 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bBw2WEvzF5sX+AOteNsPPQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wiRQ/s8GNyqViiJmG3HMRQ > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm >index 3a56d68e21..a3fd7c4f0f 100644 >--- a/Koha/Schema/Result/Reserve.pm >+++ b/Koha/Schema/Result/Reserve.pm >@@ -94,7 +94,7 @@ __PACKAGE__->table("reserves"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 itemnumber >@@ -186,7 +186,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "itemnumber", >@@ -336,8 +336,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-01 07:08:48 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pc5zh5iFbdwko5KS51Y9Uw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jZhq1NVVcesKshzQvWopuw > > __PACKAGE__->belongs_to( > "item", >diff --git a/Koha/Schema/Result/SearchHistory.pm b/Koha/Schema/Result/SearchHistory.pm >index e2886df82c..38c01920c6 100644 >--- a/Koha/Schema/Result/SearchHistory.pm >+++ b/Koha/Schema/Result/SearchHistory.pm >@@ -67,7 +67,7 @@ __PACKAGE__->table("search_history"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -96,7 +96,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -114,8 +114,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("id"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d+Qf8sL7wLldvw2qPLoBgQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VMVGSV8eY1KTpJVv0Nm5lA > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/SearchMarcToField.pm b/Koha/Schema/Result/SearchMarcToField.pm >index 01080160b9..6912fb9414 100644 >--- a/Koha/Schema/Result/SearchMarcToField.pm >+++ b/Koha/Schema/Result/SearchMarcToField.pm >@@ -23,12 +23,6 @@ __PACKAGE__->table("search_marc_to_field"); > > =head1 ACCESSORS > >-=head2 search >- >- data_type: 'tinyint' >- default_value: 1 >- is_nullable: 0 >- > =head2 search_marc_map_id > > data_type: 'integer' >@@ -64,11 +58,15 @@ true if this field can be used to generate suggestions for browse > > true/false creates special sort handling, null doesn't > >+=head2 search >+ >+ data_type: 'tinyint' >+ default_value: 1 >+ is_nullable: 0 >+ > =cut > > __PACKAGE__->add_columns( >- "search", >- { data_type => "tinyint", default_value => 1, is_nullable => 0 }, > "search_marc_map_id", > { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, > "search_field_id", >@@ -79,6 +77,8 @@ __PACKAGE__->add_columns( > { data_type => "tinyint", default_value => 0, is_nullable => 1 }, > "sort", > { data_type => "tinyint", is_nullable => 1 }, >+ "search", >+ { data_type => "tinyint", default_value => 1, is_nullable => 0 }, > ); > > =head1 PRIMARY KEY >@@ -128,8 +128,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-10-02 12:47:22 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9mqZ/zrii+Fv+k+eQNHYUw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NH2gQdc4p5gyGwbKuXIlkQ > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Serial.pm b/Koha/Schema/Result/Serial.pm >index 58aed2c012..857e5411a2 100644 >--- a/Koha/Schema/Result/Serial.pm >+++ b/Koha/Schema/Result/Serial.pm >@@ -109,11 +109,6 @@ __PACKAGE__->table("serial"); > default_value: 0 > is_nullable: 1 > >-=head2 routingnotes >- >- data_type: 'mediumtext' >- is_nullable: 1 >- > =cut > > __PACKAGE__->add_columns( >@@ -145,8 +140,6 @@ __PACKAGE__->add_columns( > { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, > "claims_count", > { data_type => "integer", default_value => 0, is_nullable => 1 }, >- "routingnotes", >- { data_type => "mediumtext", is_nullable => 1 }, > ); > > =head1 PRIMARY KEY >@@ -179,8 +172,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sRygXoIOnqpdk0lqVMcBdA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p5Ds0c7eiE3KTmFDHVMxqQ > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/SpecialHoliday.pm b/Koha/Schema/Result/SpecialHoliday.pm >index f398f209f9..be525ad76f 100644 >--- a/Koha/Schema/Result/SpecialHoliday.pm >+++ b/Koha/Schema/Result/SpecialHoliday.pm >@@ -32,6 +32,7 @@ __PACKAGE__->table("special_holidays"); > =head2 branchcode > > data_type: 'varchar' >+ default_value: (empty string) > is_foreign_key: 1 > is_nullable: 0 > size: 10 >@@ -78,7 +79,13 @@ __PACKAGE__->add_columns( > "id", > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, > "branchcode", >- { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, >+ { >+ data_type => "varchar", >+ default_value => "", >+ is_foreign_key => 1, >+ is_nullable => 0, >+ size => 10, >+ }, > "day", > { data_type => "smallint", default_value => 0, is_nullable => 0 }, > "month", >@@ -123,8 +130,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-01-20 13:57:27 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cj8Oveni0l6kAR/azmw4SA >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M1IWe2I5Gam4ItJoHeNntA > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Subscriptionroutinglist.pm b/Koha/Schema/Result/Subscriptionroutinglist.pm >index e218257986..e2f569c784 100644 >--- a/Koha/Schema/Result/Subscriptionroutinglist.pm >+++ b/Koha/Schema/Result/Subscriptionroutinglist.pm >@@ -23,105 +23,89 @@ __PACKAGE__->table("subscriptionroutinglist"); > > =head1 ACCESSORS > >-=head2 routingid >+=head2 routinglistid > > data_type: 'integer' > is_auto_increment: 1 > is_nullable: 0 > >-=head2 borrowernumber >+=head2 subscriptionid > > data_type: 'integer' > is_foreign_key: 1 > is_nullable: 0 > >-=head2 ranking >+=head2 title > >- data_type: 'integer' >- is_nullable: 1 >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 256 > >-=head2 subscriptionid >+=head2 notes > >- data_type: 'integer' >- is_foreign_key: 1 >- is_nullable: 0 >+ data_type: 'text' >+ is_nullable: 1 > > =cut > > __PACKAGE__->add_columns( >- "routingid", >+ "routinglistid", > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >- "borrowernumber", >- { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >- "ranking", >- { data_type => "integer", is_nullable => 1 }, > "subscriptionid", > { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "title", >+ { data_type => "varchar", is_nullable => 0, size => 256 }, >+ "notes", >+ { data_type => "text", is_nullable => 1 }, > ); > > =head1 PRIMARY KEY > > =over 4 > >-=item * L</routingid> >+=item * L</routinglistid> > > =back > > =cut > >-__PACKAGE__->set_primary_key("routingid"); >- >-=head1 UNIQUE CONSTRAINTS >- >-=head2 C<subscriptionid> >- >-=over 4 >- >-=item * L</subscriptionid> >- >-=item * L</borrowernumber> >- >-=back >- >-=cut >- >-__PACKAGE__->add_unique_constraint("subscriptionid", ["subscriptionid", "borrowernumber"]); >+__PACKAGE__->set_primary_key("routinglistid"); > > =head1 RELATIONS > >-=head2 borrowernumber >+=head2 subscriptionid > > Type: belongs_to > >-Related object: L<Koha::Schema::Result::Borrower> >+Related object: L<Koha::Schema::Result::Subscription> > > =cut > > __PACKAGE__->belongs_to( >- "borrowernumber", >- "Koha::Schema::Result::Borrower", >- { borrowernumber => "borrowernumber" }, >- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+ "subscriptionid", >+ "Koha::Schema::Result::Subscription", >+ { subscriptionid => "subscriptionid" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "RESTRICT" }, > ); > >-=head2 subscriptionid >+=head2 subscriptionroutings > >-Type: belongs_to >+Type: has_many > >-Related object: L<Koha::Schema::Result::Subscription> >+Related object: L<Koha::Schema::Result::Subscriptionrouting> > > =cut > >-__PACKAGE__->belongs_to( >- "subscriptionid", >- "Koha::Schema::Result::Subscription", >- { subscriptionid => "subscriptionid" }, >- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+__PACKAGE__->has_many( >+ "subscriptionroutings", >+ "Koha::Schema::Result::Subscriptionrouting", >+ { "foreign.routinglistid" => "self.routinglistid" }, >+ { cascade_copy => 0, cascade_delete => 0 }, > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AK595c56vgTa7ZjwZjberw >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ybxwm+MNY+0Z8txgjjIahw > > sub koha_object_class { > 'Koha::Subscription::Routinglist'; >diff --git a/Koha/Schema/Result/Suggestion.pm b/Koha/Schema/Result/Suggestion.pm >index 1668744771..ade1db67ba 100644 >--- a/Koha/Schema/Result/Suggestion.pm >+++ b/Koha/Schema/Result/Suggestion.pm >@@ -117,7 +117,7 @@ __PACKAGE__->table("suggestions"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 volumedesc >@@ -250,7 +250,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "volumedesc", >@@ -440,8 +440,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-11 12:56:41 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UsG/gxLa0HMMbcpbscV29Q >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jonzJsbNRJnB1hso6kIqUQ > > __PACKAGE__->belongs_to( > "suggester", >diff --git a/Koha/Schema/Result/UploadedFile.pm b/Koha/Schema/Result/UploadedFile.pm >index 5a4397db69..20d6dc9912 100644 >--- a/Koha/Schema/Result/UploadedFile.pm >+++ b/Koha/Schema/Result/UploadedFile.pm >@@ -54,7 +54,7 @@ __PACKAGE__->table("uploaded_files"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 uploadcategorycode >@@ -94,7 +94,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "uploadcategorycode", >@@ -120,8 +120,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("id"); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kJUbIULQMBo3t51HvWC8cg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dUELzltCRxC2Nfwy0MVpCw > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Virtualshelfcontent.pm b/Koha/Schema/Result/Virtualshelfcontent.pm >index a8ad19d4b0..588fca391c 100644 >--- a/Koha/Schema/Result/Virtualshelfcontent.pm >+++ b/Koha/Schema/Result/Virtualshelfcontent.pm >@@ -46,7 +46,7 @@ __PACKAGE__->table("virtualshelfcontents"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 borrowernumber >@@ -78,7 +78,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "borrowernumber", >@@ -138,8 +138,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-07-11 09:26:55 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ie3Gx+/HthZQ/4fHjcPF0w >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:20iSu9w0DCT2jgIOUpybyg > > #TODO See BZ 14544: Should be resolved by db revision > __PACKAGE__->set_primary_key("shelfnumber","biblionumber"); >diff --git a/Koha/Schema/Result/Virtualshelve.pm b/Koha/Schema/Result/Virtualshelve.pm >index 83334f8ac4..5ddedd5d03 100644 >--- a/Koha/Schema/Result/Virtualshelve.pm >+++ b/Koha/Schema/Result/Virtualshelve.pm >@@ -58,7 +58,7 @@ __PACKAGE__->table("virtualshelves"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =head2 created_on >@@ -101,7 +101,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > "created_on", >@@ -181,8 +181,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-08 14:19:17 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Xoq0lhLouCbkAp6F4ZyMGQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:59Elqv1XBtx7Sf9TI+yEDA > > sub koha_object_class { > 'Koha::Virtualshelf'; >diff --git a/Koha/Schema/Result/Zebraqueue.pm b/Koha/Schema/Result/Zebraqueue.pm >index 25e6bf9659..3934813a3e 100644 >--- a/Koha/Schema/Result/Zebraqueue.pm >+++ b/Koha/Schema/Result/Zebraqueue.pm >@@ -60,7 +60,7 @@ __PACKAGE__->table("zebraqueue"); > > data_type: 'timestamp' > datetime_undef_if_invalid: 1 >- default_value: current_timestamp >+ default_value: 'current_timestamp()' > is_nullable: 0 > > =cut >@@ -85,7 +85,7 @@ __PACKAGE__->add_columns( > { > data_type => "timestamp", > datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >+ default_value => "current_timestamp()", > is_nullable => 0, > }, > ); >@@ -103,8 +103,8 @@ __PACKAGE__->add_columns( > __PACKAGE__->set_primary_key("id"); > > >-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vU9ROiVUwXc7jhKt728dRg >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-20 10:01:41 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:n+gwp4O5CrNj25L/ZA/65g > > > # You can replace this text with custom content, and it will be preserved on regeneration >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 2c45659d34..8dbe7b5981 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -516,6 +516,9 @@ modules: > account-fines: > - > columnname: date >+ - >+ columnname: credit_number >+ is_hidden: 1 > - > columnname: account_type > - >diff --git a/installer/data/mysql/atomicupdate/bug-19036.perl b/installer/data/mysql/atomicupdate/bug-19036.perl >new file mode 100644 >index 0000000000..7a144bcd94 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-19036.perl >@@ -0,0 +1,11 @@ >+$DBversion = 'XXX'; >+if (CheckVersion($DBversion)) { >+ unless (column_exists('accountlines', 'credit_number')) { >+ $dbh->do('ALTER TABLE accountlines ADD COLUMN credit_number VARCHAR(20) NULL DEFAULT NULL COMMENT "autogenerated number for credits" AFTER debit_type_code'); >+ } >+ >+ $dbh->do('INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES(?, ?, ?, ?, ?)', undef, 'AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'); >+ >+ SetVersion($DBversion); >+ print "Upgrade to $DBversion done (Bug 19036 - Add column accountlines.credit_number)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index f3b965f23c..31459b3a37 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2654,6 +2654,7 @@ CREATE TABLE `accountlines` ( > `description` LONGTEXT, > `credit_type_code` varchar(80) default NULL, > `debit_type_code` varchar(80) default NULL, >+ `credit_number` varchar(20) NULL DEFAULT NULL COMMENT 'autogenerated number for credits', > `status` varchar(16) default NULL, > `payment_type` varchar(80) default NULL, -- optional authorised value PAYMENT_TYPE > `amountoutstanding` decimal(28,6) default NULL, >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 57ab2480a1..52e19dbeaa 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -67,6 +67,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('AuthoritySeparator','--','10','Used to separate a list of authorities in a display. Usually --','free'), > ('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'), > ('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'), >+('AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'), > ('AutoEmailOpacUser','0',NULL,'Sends notification emails containing new account details to patrons - when account is created.','YesNo'), > ('AutoEmailPrimaryAddress','OFF','email|emailpro|B_email|cardnumber|OFF','Defines the default email address where \'Account Details\' emails are sent.','Choice'), > ('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounting.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounting.pref >index 36241161b9..afd3cd6db2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounting.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounting.pref >@@ -27,3 +27,10 @@ Accounting: > yes: "Enable" > no: "Disable" > - " the point of sale feature to allow anonymous transactions with the accounting system. (Requires UseCashRegisters)" >+ - >+ - pref: AutoCreditNumber >+ choices: >+ '': 'Do not automatically generate credit numbers' >+ annual: 'Automatically generate credit numbers in the form <year>-0001' >+ branchyyyymmincr: 'Automatically generate credit numbers in the form <branchcode>yyyymm0001' >+ incremental: 'Automatically generate credit numbers in the form 1, 2, 3' >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >index c93eb6fa09..adf26abc4a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt >@@ -44,6 +44,7 @@ > <thead> > <tr> > <th class="title-string">Date</th> >+ <th>Credit number</th> > <th>Account type</th> > <th>Description of charges</th> > <th>Barcode</th> >@@ -62,6 +63,7 @@ > > <tr> > <td><span title="[% account.date | html %]">[% account.date |$KohaDates %]</span></td> >+ <td>[% account.credit_number | html %]</td> > <td>[% PROCESS account_type_description account=account %]</td> > <td> > [%- IF account.payment_type %][% AuthorisedValues.GetByCode('PAYMENT_TYPE', account.payment_type) | html %][% END %] >@@ -96,7 +98,7 @@ > [% END %] > <tfoot> > <tr> >- <td colspan="9">Total due</td> >+ <td colspan="10">Total due</td> > [% IF ( totalcredit ) %] > <td class="credit" style="text-align: right;">[% total | $Price %]</td> > [% ELSE %] >diff --git a/t/db_dependent/Koha/Account.t b/t/db_dependent/Koha/Account.t >index 5437f16403..b5e3c7e972 100755 >--- a/t/db_dependent/Koha/Account.t >+++ b/t/db_dependent/Koha/Account.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 11; >+use Test::More tests => 12; > use Test::MockModule; > use Test::Exception; > >@@ -979,3 +979,51 @@ subtest 'Koha::Account::Line::apply() handles lost items' => sub { > > $schema->storage->txn_rollback; > }; >+ >+subtest 'Koha::Account::pay() generates credit number' => sub { >+ plan tests => 34; >+ >+ $schema->storage->txn_begin; >+ >+ Koha::Account::Lines->delete(); >+ >+ my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); >+ my $library = $builder->build_object( { class => 'Koha::Libraries' } ); >+ my $account = $patron->account; >+ >+ my $context = Test::MockModule->new('C4::Context'); >+ $context->mock( 'userenv', { branch => $library->id } ); >+ >+ my $now = DateTime->now; >+ my $year = $now->year; >+ my $month = $now->month; >+ my ($accountlines_id, $accountline); >+ >+ t::lib::Mocks::mock_preference('AutoCreditNumber', ''); >+ $accountlines_id = $account->pay({ amount => '1.00', library_id => $library->id }); >+ $accountline = Koha::Account::Lines->find($accountlines_id); >+ is($accountline->credit_number, undef, 'No credit number is generated when syspref is off'); >+ >+ t::lib::Mocks::mock_preference('AutoCreditNumber', 'incremental'); >+ for my $i (1..11) { >+ $accountlines_id = $account->pay({ amount => '1.00', library_id => $library->id }); >+ $accountline = Koha::Account::Lines->find($accountlines_id); >+ is($accountline->credit_number, $i); >+ } >+ >+ t::lib::Mocks::mock_preference('AutoCreditNumber', 'annual'); >+ for my $i (1..11) { >+ $accountlines_id = $account->pay({ amount => '1.00', library_id => $library->id }); >+ $accountline = Koha::Account::Lines->find($accountlines_id); >+ is($accountline->credit_number, sprintf('%s-%04d', $year, $i)); >+ } >+ >+ t::lib::Mocks::mock_preference('AutoCreditNumber', 'branchyyyymmincr'); >+ for my $i (1..11) { >+ $accountlines_id = $account->pay({ amount => '1.00', library_id => $library->id }); >+ $accountline = Koha::Account::Lines->find($accountlines_id); >+ is($accountline->credit_number, sprintf('%s%d%02d%04d', $library->id, $year, $month, $i)); >+ } >+ >+ $schema->storage->txn_rollback; >+}; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19036
:
99301
|
99302
|
99303
|
99676
|
101549
|
101550
|
101896
|
101897
|
106278
|
106279
|
106280
|
106281
|
106767
|
107872
|
107875
|
107877
|
108323
|
108324
|
108325
|
108326
|
108327
|
108328
|
108329
|
108525
|
108587
|
108733