From b6a79c5de2b667e6b04c9897dd886628801f372e Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 19 Dec 2024 16:56:09 +0000 Subject: [PATCH] Bug 38689: DBIC Schema Update --- Koha/Schema/Result/EdifactError.pm | 104 +++++++++++++++++++++++++++ Koha/Schema/Result/EdifactMessage.pm | 19 ++++- 2 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 Koha/Schema/Result/EdifactError.pm diff --git a/Koha/Schema/Result/EdifactError.pm b/Koha/Schema/Result/EdifactError.pm new file mode 100644 index 00000000000..2af49d317a5 --- /dev/null +++ b/Koha/Schema/Result/EdifactError.pm @@ -0,0 +1,104 @@ +use utf8; +package Koha::Schema::Result::EdifactError; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::EdifactError + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("edifact_errors"); + +=head1 ACCESSORS + +=head2 id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +=head2 message_id + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 0 + +=head2 date + + data_type: 'date' + datetime_undef_if_invalid: 1 + is_nullable: 1 + +=head2 section + + data_type: 'mediumtext' + is_nullable: 1 + +=head2 details + + data_type: 'mediumtext' + is_nullable: 1 + +=cut + +__PACKAGE__->add_columns( + "id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "message_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, + "date", + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, + "section", + { data_type => "mediumtext", is_nullable => 1 }, + "details", + { data_type => "mediumtext", is_nullable => 1 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("id"); + +=head1 RELATIONS + +=head2 message + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "message", + "Koha::Schema::Result::EdifactMessage", + { id => "message_id" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-12-19 16:24:01 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eDk5vkbGeMthv3oVJUC7yQ + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/EdifactMessage.pm b/Koha/Schema/Result/EdifactMessage.pm index 225481ed777..9f58db9350c 100644 --- a/Koha/Schema/Result/EdifactMessage.pm +++ b/Koha/Schema/Result/EdifactMessage.pm @@ -174,6 +174,21 @@ __PACKAGE__->belongs_to( }, ); +=head2 edifact_errors + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "edifact_errors", + "Koha::Schema::Result::EdifactError", + { "foreign.message_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 vendor Type: belongs_to @@ -195,8 +210,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JHUEsQ+kXjGTRxxc2FFSjQ +# Created by DBIx::Class::Schema::Loader v0.07051 @ 2024-12-19 16:24:01 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bB1E11DztQ9y9UTnEKtQ1Q __PACKAGE__->add_columns( '+deleted' => { is_boolean => 1 }, -- 2.47.1