From 07e44886042cd29dd17e1f2aac1aeb6abc9df795 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 29 Apr 2016 10:32:38 +0000 Subject: [PATCH] Bug 15533 - DBRev - Update Schema Files to match current DB structure Signed-off-by: Kyle M Hall --- Koha/Schema/Result/BranchItemRule.pm | 18 +++++++++-- Koha/Schema/Result/DefaultBranchCircRule.pm | 18 +++++++++-- Koha/Schema/Result/DefaultBranchItemRule.pm | 18 +++++++++-- Koha/Schema/Result/DefaultCircRule.pm | 18 +++++++++-- Koha/Schema/Result/EdifactMessage.pm | 16 +++++----- Koha/Schema/Result/Itemtype.pm | 34 +++++++++++++++++++-- 6 files changed, 104 insertions(+), 18 deletions(-) diff --git a/Koha/Schema/Result/BranchItemRule.pm b/Koha/Schema/Result/BranchItemRule.pm index a074597cc5..dafd57a45d 100644 --- a/Koha/Schema/Result/BranchItemRule.pm +++ b/Koha/Schema/Result/BranchItemRule.pm @@ -42,6 +42,13 @@ __PACKAGE__->table("branch_item_rules"); data_type: 'tinyint' is_nullable: 1 +=head2 hold_fulfillment_policy + + data_type: 'enum' + default_value: 'any' + extra: {list => ["any","homebranch","holdingbranch"]} + is_nullable: 0 + =head2 returnbranch data_type: 'varchar' @@ -57,6 +64,13 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, "holdallowed", { data_type => "tinyint", is_nullable => 1 }, + "hold_fulfillment_policy", + { + data_type => "enum", + default_value => "any", + extra => { list => ["any", "homebranch", "holdingbranch"] }, + is_nullable => 0, + }, "returnbranch", { data_type => "varchar", is_nullable => 1, size => 15 }, ); @@ -108,8 +122,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:YLO0fLLilsc7tSfx8v/biw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-29 10:32:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yMmvhDqtrKcNeDU9ZJCQZw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/DefaultBranchCircRule.pm b/Koha/Schema/Result/DefaultBranchCircRule.pm index 5963b056ca..776b0e4b44 100644 --- a/Koha/Schema/Result/DefaultBranchCircRule.pm +++ b/Koha/Schema/Result/DefaultBranchCircRule.pm @@ -45,6 +45,13 @@ __PACKAGE__->table("default_branch_circ_rules"); data_type: 'tinyint' is_nullable: 1 +=head2 hold_fulfillment_policy + + data_type: 'enum' + default_value: 'any' + extra: {list => ["any","homebranch","holdingbranch"]} + is_nullable: 0 + =head2 returnbranch data_type: 'varchar' @@ -62,6 +69,13 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 1 }, "holdallowed", { data_type => "tinyint", is_nullable => 1 }, + "hold_fulfillment_policy", + { + data_type => "enum", + default_value => "any", + extra => { list => ["any", "homebranch", "holdingbranch"] }, + is_nullable => 0, + }, "returnbranch", { data_type => "varchar", is_nullable => 1, size => 15 }, ); @@ -96,8 +110,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-05-13 17:48:39 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p95r3cEx85NtMTEAgiRgBw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-29 10:32:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wnrxD1/tp8X01YHmys02lg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/DefaultBranchItemRule.pm b/Koha/Schema/Result/DefaultBranchItemRule.pm index f31aa00e39..613df29f1e 100644 --- a/Koha/Schema/Result/DefaultBranchItemRule.pm +++ b/Koha/Schema/Result/DefaultBranchItemRule.pm @@ -35,6 +35,13 @@ __PACKAGE__->table("default_branch_item_rules"); data_type: 'tinyint' is_nullable: 1 +=head2 hold_fulfillment_policy + + data_type: 'enum' + default_value: 'any' + extra: {list => ["any","homebranch","holdingbranch"]} + is_nullable: 0 + =head2 returnbranch data_type: 'varchar' @@ -48,6 +55,13 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 10 }, "holdallowed", { data_type => "tinyint", is_nullable => 1 }, + "hold_fulfillment_policy", + { + data_type => "enum", + default_value => "any", + extra => { list => ["any", "homebranch", "holdingbranch"] }, + is_nullable => 0, + }, "returnbranch", { data_type => "varchar", is_nullable => 1, size => 15 }, ); @@ -82,8 +96,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:Mm4EAx13qTr5S02B9dt01g +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-29 10:32:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+dEOJjQezQNGILloXC2HfQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/DefaultCircRule.pm b/Koha/Schema/Result/DefaultCircRule.pm index 5e0f266ddf..355f4ea385 100644 --- a/Koha/Schema/Result/DefaultCircRule.pm +++ b/Koha/Schema/Result/DefaultCircRule.pm @@ -45,6 +45,13 @@ __PACKAGE__->table("default_circ_rules"); data_type: 'integer' is_nullable: 1 +=head2 hold_fulfillment_policy + + data_type: 'enum' + default_value: 'any' + extra: {list => ["any","homebranch","holdingbranch"]} + is_nullable: 0 + =head2 returnbranch data_type: 'varchar' @@ -67,6 +74,13 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 1 }, "holdallowed", { data_type => "integer", is_nullable => 1 }, + "hold_fulfillment_policy", + { + data_type => "enum", + default_value => "any", + extra => { list => ["any", "homebranch", "holdingbranch"] }, + is_nullable => 0, + }, "returnbranch", { data_type => "varchar", is_nullable => 1, size => 15 }, ); @@ -84,8 +98,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("singleton"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-05-13 17:48:39 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TLEpv+H3v7P3psVl+WMA0Q +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-29 10:32:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fqBrj0c9h9c0eBlC0kG51w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/EdifactMessage.pm b/Koha/Schema/Result/EdifactMessage.pm index 3250a57e75..98c8b02a6f 100644 --- a/Koha/Schema/Result/EdifactMessage.pm +++ b/Koha/Schema/Result/EdifactMessage.pm @@ -149,8 +149,8 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, join_type => "LEFT", - on_delete => "RESTRICT", - on_update => "RESTRICT", + on_delete => "CASCADE", + on_update => "CASCADE", }, ); @@ -169,8 +169,8 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, join_type => "LEFT", - on_delete => "RESTRICT", - on_update => "RESTRICT", + on_delete => "CASCADE", + on_update => "CASCADE", }, ); @@ -189,14 +189,14 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, join_type => "LEFT", - on_delete => "RESTRICT", - on_update => "RESTRICT", + on_delete => "CASCADE", + on_update => "CASCADE", }, ); -# Created by DBIx::Class::Schema::Loader v0.07033 @ 2015-02-25 10:41:36 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:l4h8AsG2RJupxXQcEw8yzQ +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-29 10:32:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R20sqhX9IbPaonx9HnRKeQ 1; diff --git a/Koha/Schema/Result/Itemtype.pm b/Koha/Schema/Result/Itemtype.pm index 0be9faf9e1..6884bf5457 100644 --- a/Koha/Schema/Result/Itemtype.pm +++ b/Koha/Schema/Result/Itemtype.pm @@ -164,9 +164,39 @@ __PACKAGE__->might_have( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 old_reserves -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-10-22 11:11:19 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nknZ3AB923k+tEw7whtzQA +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "old_reserves", + "Koha::Schema::Result::OldReserve", + { "foreign.itemtype" => "self.itemtype" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 reserves + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "reserves", + "Koha::Schema::Result::Reserve", + { "foreign.itemtype" => "self.itemtype" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-04-29 10:32:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1GiikODklVISOurHX37qjA # You can replace this text with custom content, and it will be preserved on regeneration -- 2.39.2