From 739cbc1c411c22984d2288449156c3bc65436088 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 15 May 2020 13:46:05 -0400 Subject: [PATCH] Bug 24857: Update existing Schema files [DO NOT PUSH] --- Koha/Schema/Result/Biblio.pm | 19 +++++++++++++++++-- Koha/Schema/Result/Item.pm | 19 +++++++++++++++++-- Koha/Schema/Result/Volume.pm | 18 ++++++++++++------ Koha/Schema/Result/VolumeItem.pm | 20 ++++++++++++++++++-- 4 files changed, 64 insertions(+), 12 deletions(-) diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm index 806faf87ad..9007f3115b 100644 --- a/Koha/Schema/Result/Biblio.pm +++ b/Koha/Schema/Result/Biblio.pm @@ -450,9 +450,24 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 volumes -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-17 09:15:51 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p2SIq565zPyE3ZUkSuXyBA +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "volumes", + "Koha::Schema::Result::Volume", + { "foreign.biblionumber" => "self.biblionumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-05-15 17:43:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AQnP0926C/nCaNuMRT7BLQ __PACKAGE__->has_one( diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index cb77d96ee0..dfdb0bd2f4 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -746,9 +746,24 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 volume_items -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-04-27 10:38:13 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IpI7wRweeZCbCeU1LhZbRQ +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "volume_items", + "Koha::Schema::Result::VolumeItem", + { "foreign.itemnumber" => "self.itemnumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-05-15 17:43:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Tbm1Md4p51ZGJjmQ3mn/Jw __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/Koha/Schema/Result/Volume.pm b/Koha/Schema/Result/Volume.pm index 30388d165d..d7a4a35824 100644 --- a/Koha/Schema/Result/Volume.pm +++ b/Koha/Schema/Result/Volume.pm @@ -36,6 +36,12 @@ __PACKAGE__->table("volumes"); is_foreign_key: 1 is_nullable: 0 +=head2 display_order + + data_type: 'integer' + default_value: 0 + is_nullable: 0 + =head2 description data_type: 'mediumtext' @@ -45,8 +51,7 @@ __PACKAGE__->table("volumes"); data_type: 'timestamp' datetime_undef_if_invalid: 1 - default_value: '0000-00-00 00:00:00' - is_nullable: 0 + is_nullable: 1 =head2 updated_on @@ -67,14 +72,15 @@ __PACKAGE__->add_columns( is_foreign_key => 1, is_nullable => 0, }, + "display_order", + { data_type => "integer", default_value => 0, is_nullable => 0 }, "description", { data_type => "mediumtext", is_nullable => 1 }, "created_on", { data_type => "timestamp", datetime_undef_if_invalid => 1, - default_value => "0000-00-00 00:00:00", - is_nullable => 0, + is_nullable => 1, }, "updated_on", { @@ -130,8 +136,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-04 15:22:18 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cXvLM2TgY18pxE2ZJBMouw +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-05-15 17:43:22 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0synkJlBPpaIOLrX2KUKiA sub koha_objects_class { 'Koha::Biblio::Volumes'; diff --git a/Koha/Schema/Result/VolumeItem.pm b/Koha/Schema/Result/VolumeItem.pm index 3ce549209b..835532daf0 100644 --- a/Koha/Schema/Result/VolumeItem.pm +++ b/Koha/Schema/Result/VolumeItem.pm @@ -76,6 +76,22 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("id"); +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("volume_id", ["volume_id", "itemnumber"]); + =head1 RELATIONS =head2 itemnumber @@ -109,8 +125,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-02-03 18:25:20 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:i6YHB4Jq+79kVVYmuurzIQ +# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-05-15 17:43:22 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jocpH15LNMhDBp6EbZJNsg sub koha_object_class { 'Koha::Biblio::Volume::Item'; -- 2.24.2 (Apple Git-127)