From d6012465da02bd41029be4cbae74f990fd2648ce Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 13 Jul 2021 12:47:55 -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 dd14f2d807..2efccda5ba 100644 --- a/Koha/Schema/Result/Biblio.pm +++ b/Koha/Schema/Result/Biblio.pm @@ -495,9 +495,24 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 volumes -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-02-03 10:03:26 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YVZN5K/K1v7Kj2yYGwT2CQ +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 @ 2021-07-13 16:46:12 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GCOMiAlgo6+QR5Z1uAKDrg __PACKAGE__->has_many( "biblioitem", diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index 1d818126a4..7228b5cc19 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -849,9 +849,24 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 volume_items -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U5Tm2JfUnfhACRDJ4SpFgQ +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 @ 2021-07-13 16:46:12 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wsfHfXvzRZqMMkC3CkVR0w __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..bba4efc490 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 @ 2021-07-13 16:46:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:w4tPedBapvhpwYov9Cb/gQ =head2 koha_objects_class diff --git a/Koha/Schema/Result/VolumeItem.pm b/Koha/Schema/Result/VolumeItem.pm index c07fa97167..1a730f2d0d 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 @ 2021-07-13 16:46:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ALKnoA3HMZ2J4AsXes5nuA =head2 koha_object_class -- 2.30.1 (Apple Git-130)