From 09a510cef4e226b051e06f0273b4f9f445b4c0f4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 14 Dec 2018 12:51:54 -0300 Subject: [PATCH] Bug 21065: Update DBIC Schema change Signed-off-by: Martin Renvoize --- Koha/Schema/Result/Accountline.pm | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Koha/Schema/Result/Accountline.pm b/Koha/Schema/Result/Accountline.pm index 2545995e99..1b07f13391 100644 --- a/Koha/Schema/Result/Accountline.pm +++ b/Koha/Schema/Result/Accountline.pm @@ -37,9 +37,8 @@ __PACKAGE__->table("accountlines"); =head2 borrowernumber data_type: 'integer' - default_value: 0 is_foreign_key: 1 - is_nullable: 0 + is_nullable: 1 =head2 accountno @@ -119,12 +118,7 @@ __PACKAGE__->add_columns( "issue_id", { data_type => "integer", is_nullable => 1 }, "borrowernumber", - { - data_type => "integer", - default_value => 0, - is_foreign_key => 1, - is_nullable => 0, - }, + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "accountno", { data_type => "smallint", default_value => 0, is_nullable => 0 }, "itemnumber", @@ -212,7 +206,12 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "SET NULL", + on_update => "CASCADE", + }, ); =head2 itemnumber @@ -236,8 +235,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-05-16 17:00:24 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pygYYKxFDRLX97PyeUeLvg +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-12-14 12:44:45 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jTHbMn2npXMohfx+ttH2Pg sub koha_objects_class { 'Koha::Account::Lines'; -- 2.19.2