From 90acad11d51bf541c7b42fa93944fbb8c846676e Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 26 Feb 2016 14:38:31 +0100 Subject: [PATCH] Bug 13534: Update DBIx::Class schema --- Koha/Schema/Result/TagAll.pm | 15 ++++++++++----- Koha/Schema/Result/TagsApproval.pm | 6 +++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Koha/Schema/Result/TagAll.pm b/Koha/Schema/Result/TagAll.pm index ca1a47039e..185cdc2ae7 100644 --- a/Koha/Schema/Result/TagAll.pm +++ b/Koha/Schema/Result/TagAll.pm @@ -33,7 +33,7 @@ __PACKAGE__->table("tags_all"); data_type: 'integer' is_foreign_key: 1 - is_nullable: 0 + is_nullable: 1 =head2 biblionumber @@ -64,7 +64,7 @@ __PACKAGE__->add_columns( "tag_id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "borrowernumber", - { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "biblionumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "term", @@ -120,12 +120,17 @@ __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", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xhJn9d2lS8crFWog28ENnw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-02-26 14:38:06 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Tth/cGqbOwePLr+wToQEzQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/TagsApproval.pm b/Koha/Schema/Result/TagsApproval.pm index 50abeb2091..deccab9cef 100644 --- a/Koha/Schema/Result/TagsApproval.pm +++ b/Koha/Schema/Result/TagsApproval.pm @@ -101,7 +101,7 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, join_type => "LEFT", - on_delete => "CASCADE", + on_delete => "SET NULL", on_update => "CASCADE", }, ); @@ -122,8 +122,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TcnMQQTB5F8hjyLoJ7VBHQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-02-26 14:38:06 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rrvxZ77asIDIk7Yg7etPZQ # You can replace this text with custom content, and it will be preserved on regeneration -- 2.39.5