From 535a57c14ef63279987e999aa603d967f07a1ad0 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 5 Nov 2020 14:19:56 -0500 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 fa3979886f..be6c01481b 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.07049 @ 2020-10-12 09:13:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R4PNOXHa9cRIx/up7HWz4Q +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-11-05 18:59:42 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xiOczTd8lB1rsu3TAG2Sqg __PACKAGE__->has_one( diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index cd22433ad2..f61d418b5f 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -761,9 +761,24 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 volume_items -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-10-12 09:13:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pmAVO6LxCb6wAJvfh+rndw +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-11-05 18:59:42 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Evmi2YPAuV8qW0hTQSnNRg __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); diff --git a/Koha/Schema/Result/Volume.pm b/Koha/Schema/Result/Volume.pm index ea5d446dba..e532e89e7a 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-11-05 18:59:43 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YKcsboHxWfAQgUIRZEivAQ =head2 koha_objects_class diff --git a/Koha/Schema/Result/VolumeItem.pm b/Koha/Schema/Result/VolumeItem.pm index c07fa97167..dee7ae78b2 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-11-05 18:59:43 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MzxVYdlWCeUEOR9GNHSmfA =head2 koha_object_class -- 2.24.1 (Apple Git-126)