From 41181b27087b1b547e8a487afc3207e9677fab6d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 5 Feb 2015 15:21:51 -0300 Subject: [PATCH] Bug 12601: (RM followup) DBIx updates Signed-off-by: Tomas Cohen Arazi --- Koha/Schema/Result/Aqbudget.pm | 19 +++++++++++++++++-- Koha/Schema/Result/Aqorder.pm | 22 +++++++++++++++++++--- Koha/Schema/Result/AuthorisedValue.pm | 19 +++++++++++++++++-- Koha/Schema/Result/ItemsSearchField.pm | 8 ++++---- 4 files changed, 57 insertions(+), 11 deletions(-) diff --git a/Koha/Schema/Result/Aqbudget.pm b/Koha/Schema/Result/Aqbudget.pm index 336e2db5a7..72592897cb 100644 --- a/Koha/Schema/Result/Aqbudget.pm +++ b/Koha/Schema/Result/Aqbudget.pm @@ -227,6 +227,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 aqorders + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "aqorders", + "Koha::Schema::Result::Aqorder", + { "foreign.budget_id" => "self.budget_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 borrowernumbers Type: many_to_many @@ -238,8 +253,8 @@ Composing rels: L -> borrowernumber __PACKAGE__->many_to_many("borrowernumbers", "aqbudgetborrowers", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dxOTKpdIJ6ruJUE++4fC8w +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-02-05 15:20:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:733+8NRE5Ip/30URBcJsbA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqorder.pm b/Koha/Schema/Result/Aqorder.pm index 0379a90009..6d7ab2274e 100644 --- a/Koha/Schema/Result/Aqorder.pm +++ b/Koha/Schema/Result/Aqorder.pm @@ -165,6 +165,7 @@ __PACKAGE__->table("aqorders"); =head2 budget_id data_type: 'integer' + is_foreign_key: 1 is_nullable: 0 =head2 budgetgroup_id @@ -294,7 +295,7 @@ __PACKAGE__->add_columns( "discount", { data_type => "float", is_nullable => 1, size => [6, 4] }, "budget_id", - { data_type => "integer", is_nullable => 0 }, + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "budgetgroup_id", { data_type => "integer", is_nullable => 0 }, "budgetdate", @@ -425,6 +426,21 @@ __PACKAGE__->belongs_to( }, ); +=head2 budget + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "budget", + "Koha::Schema::Result::Aqbudget", + { budget_id => "budget_id" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + =head2 invoiceid Type: belongs_to @@ -466,8 +482,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-10-30 01:04:01 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M+R6T+KIk4lqzdYjbYvg9w +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-02-05 15:20:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MfXZ8f2Md6X+C1fVU8TtOg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AuthorisedValue.pm b/Koha/Schema/Result/AuthorisedValue.pm index b19747b220..481837863e 100644 --- a/Koha/Schema/Result/AuthorisedValue.pm +++ b/Koha/Schema/Result/AuthorisedValue.pm @@ -107,9 +107,24 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 items_search_fields -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-01-13 13:14:54 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/LKBdxi1YA7ggV78u9BlVA +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "items_search_fields", + "Koha::Schema::Result::ItemsSearchField", + { "foreign.authorised_values_category" => "self.category" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-02-05 15:20:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GS7UBpk66HAhBptwrpKR7Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ItemsSearchField.pm b/Koha/Schema/Result/ItemsSearchField.pm index 876023cb0b..3b6e6be872 100644 --- a/Koha/Schema/Result/ItemsSearchField.pm +++ b/Koha/Schema/Result/ItemsSearchField.pm @@ -52,7 +52,7 @@ __PACKAGE__->table("items_search_fields"); data_type: 'varchar' is_foreign_key: 1 is_nullable: 1 - size: 16 + size: 32 =cut @@ -66,7 +66,7 @@ __PACKAGE__->add_columns( "tagsubfield", { data_type => "char", is_nullable => 1, size => 1 }, "authorised_values_category", - { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 16 }, + { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 32 }, ); =head1 PRIMARY KEY @@ -104,8 +104,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-04 19:23:41 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4zpzfz1VNYNVM5M/btiPOA +# Created by DBIx::Class::Schema::Loader v0.07039 @ 2015-02-05 15:20:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oHoTxnECC/702vwFO4vdqw # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.39.5