From 780ca530c64a9600ca31e07ae84e7d329849991c Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Fri, 26 Apr 2024 13:30:02 +0000 Subject: [PATCH] Bug 35919: DBIC schema update Signed-off-by: Katrin Fischer --- Koha/Schema/Result/BiblioMetadata.pm | 34 +++++++++++++++++++-- Koha/Schema/Result/DeletedbiblioMetadata.pm | 34 +++++++++++++++++++-- Koha/Schema/Result/Deleteditem.pm | 8 ++--- Koha/Schema/Result/Item.pm | 8 ++--- 4 files changed, 72 insertions(+), 12 deletions(-) diff --git a/Koha/Schema/Result/BiblioMetadata.pm b/Koha/Schema/Result/BiblioMetadata.pm index aa1a7b25ee..ed06094901 100644 --- a/Koha/Schema/Result/BiblioMetadata.pm +++ b/Koha/Schema/Result/BiblioMetadata.pm @@ -59,6 +59,14 @@ __PACKAGE__->table("biblio_metadata"); default_value: current_timestamp is_nullable: 0 +=head2 record_source_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + +The record source for the metadata + =cut __PACKAGE__->add_columns( @@ -79,6 +87,8 @@ __PACKAGE__->add_columns( default_value => \"current_timestamp", is_nullable => 0, }, + "record_source_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -131,9 +141,29 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); +=head2 record_source + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "record_source", + "Koha::Schema::Result::RecordSource", + { record_source_id => "record_source_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-30 11:34:16 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJk/YOw8Y/QRmmPPL3G5qQ +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-04-26 13:23:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pQ87jRoTMpqkm8GPh/tpHQ sub koha_object_class { 'Koha::Biblio::Metadata'; diff --git a/Koha/Schema/Result/DeletedbiblioMetadata.pm b/Koha/Schema/Result/DeletedbiblioMetadata.pm index 29971cdf08..38fd6e974c 100644 --- a/Koha/Schema/Result/DeletedbiblioMetadata.pm +++ b/Koha/Schema/Result/DeletedbiblioMetadata.pm @@ -59,6 +59,14 @@ __PACKAGE__->table("deletedbiblio_metadata"); default_value: current_timestamp is_nullable: 0 +=head2 record_source_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + +The record source for the metadata + =cut __PACKAGE__->add_columns( @@ -79,6 +87,8 @@ __PACKAGE__->add_columns( default_value => \"current_timestamp", is_nullable => 0, }, + "record_source_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, ); =head1 PRIMARY KEY @@ -131,9 +141,29 @@ __PACKAGE__->belongs_to( { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); +=head2 record_source + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "record_source", + "Koha::Schema::Result::RecordSource", + { record_source_id => "record_source_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-01-30 11:34:16 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JCOh+FSSTgPlC8lMJOdOOA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-04-26 13:23:01 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:n/IgiGmKu1znMd78vA+pVw sub koha_objects_class { 'Koha::Old::Biblio::Metadatas'; diff --git a/Koha/Schema/Result/Deleteditem.pm b/Koha/Schema/Result/Deleteditem.pm index be3319cd1e..118b225121 100644 --- a/Koha/Schema/Result/Deleteditem.pm +++ b/Koha/Schema/Result/Deleteditem.pm @@ -223,7 +223,7 @@ number of times this item has been renewed data_type: 'smallint' is_nullable: 1 -number of times this item has been recorded for localuse +number of times this item has been recorded as localuse =head2 reserves @@ -461,7 +461,7 @@ __PACKAGE__->add_columns( "issues", { data_type => "smallint", default_value => 0, is_nullable => 1 }, "renewals", - { data_type => "smallint", default_value => 0, is_nullable => 1 }, + { data_type => "smallint", is_nullable => 1 }, "localuse", { data_type => "smallint", is_nullable => 1 }, "reserves", @@ -532,8 +532,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("itemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-10-02 11:06:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Afgr1jl6aeSy/rS9RJGq2g +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-04-26 13:26:37 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:13COB8Ty6QDInmxN/zvEig __PACKAGE__->add_columns( '+bookable' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index b547fd3fdf..dcbd2275a8 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -226,7 +226,7 @@ number of times this item has been renewed data_type: 'smallint' is_nullable: 1 -number of times this item has been recorded for localuse +number of times this item has been recorded as localuse =head2 reserves @@ -475,7 +475,7 @@ __PACKAGE__->add_columns( "issues", { data_type => "smallint", default_value => 0, is_nullable => 1 }, "renewals", - { data_type => "smallint", default_value => 0, is_nullable => 1 }, + { data_type => "smallint", is_nullable => 1 }, "localuse", { data_type => "smallint", is_nullable => 1 }, "reserves", @@ -992,8 +992,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-11-03 14:18:06 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0jargxEw3HZOK57+ijsMHA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-04-26 13:26:37 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8BzPWv3gqdhfLNz+Il93cw __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); -- 2.39.2