From 4553451ec206350bf05c5f01c2d6c7bc9bdb8a33 Mon Sep 17 00:00:00 2001 From: Victor Grousset/tuxayo Date: Tue, 22 Feb 2022 15:09:50 +0100 Subject: [PATCH] Bug ?????: DBIC schema changes: bug of dbic or forgotten update Or a bug of DBIC that creates duplicate relationships mappings that should be harmless. Or a forgotten update but it was not possible to track down the ticket. Signed-off-by: Victor Grousset/tuxayo --- Koha/Schema/Result/Aqbasket.pm | 19 +++++++- Koha/Schema/Result/Aqbookseller.pm | 34 +++++++++++++- Koha/Schema/Result/Aqbudget.pm | 19 +++++++- Koha/Schema/Result/Branch.pm | 19 +++++++- Koha/Schema/Result/EdifactEan.pm | 24 +++++++++- Koha/Schema/Result/EdifactMessage.pm | 64 +++++++++++++++++++++++++- Koha/Schema/Result/VendorEdiAccount.pm | 59 +++++++++++++++++++++++- 7 files changed, 224 insertions(+), 14 deletions(-) diff --git a/Koha/Schema/Result/Aqbasket.pm b/Koha/Schema/Result/Aqbasket.pm index 60d5633a58..5b701b95c9 100644 --- a/Koha/Schema/Result/Aqbasket.pm +++ b/Koha/Schema/Result/Aqbasket.pm @@ -298,6 +298,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 edifact_messages_2s + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "edifact_messages_2s", + "Koha::Schema::Result::EdifactMessage", + { "foreign.basketno" => "self.basketno" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 borrowernumbers Type: many_to_many @@ -309,8 +324,8 @@ Composing rels: L -> borrowernumber __PACKAGE__->many_to_many("borrowernumbers", "aqbasketusers", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gSw/f4JmMBzEssEFRg2fAQ +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-22 14:08:17 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:x4mg2lLQrfUdE3LnGSgr0g __PACKAGE__->has_many( "additional_field_values", diff --git a/Koha/Schema/Result/Aqbookseller.pm b/Koha/Schema/Result/Aqbookseller.pm index a9bf2e51bd..a77b566355 100644 --- a/Koha/Schema/Result/Aqbookseller.pm +++ b/Koha/Schema/Result/Aqbookseller.pm @@ -289,6 +289,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 edifact_messages_2s + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "edifact_messages_2s", + "Koha::Schema::Result::EdifactMessage", + { "foreign.vendor_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 invoiceprice Type: belongs_to @@ -344,9 +359,24 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 vendor_edi_accounts_2s + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "vendor_edi_accounts_2s", + "Koha::Schema::Result::VendorEdiAccount", + { "foreign.vendor_id" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-17 08:54:13 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1lSFcy25po9EBzkNkjL5UA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-22 14:08:17 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+RLDWNQcqEm1TmE0L9i++w __PACKAGE__->add_columns( '+active' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/Aqbudget.pm b/Koha/Schema/Result/Aqbudget.pm index e645e55432..b24568d1bb 100644 --- a/Koha/Schema/Result/Aqbudget.pm +++ b/Koha/Schema/Result/Aqbudget.pm @@ -308,6 +308,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 vendor_edi_accounts_2s + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "vendor_edi_accounts_2s", + "Koha::Schema::Result::VendorEdiAccount", + { "foreign.shipment_budget" => "self.budget_id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 borrowernumbers Type: many_to_many @@ -319,8 +334,8 @@ Composing rels: L -> borrowernumber __PACKAGE__->many_to_many("borrowernumbers", "aqbudgetborrowers", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-09-13 23:03:50 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kmzXRyD6aNqPr5C6u9GBHA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-22 14:08:17 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:79woPPrp25KW0ndxVWXQQQ __PACKAGE__->belongs_to( "budget", diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm index 6194e20ca9..f42ebdda69 100644 --- a/Koha/Schema/Result/Branch.pm +++ b/Koha/Schema/Result/Branch.pm @@ -570,6 +570,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 edifact_eans_2s + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "edifact_eans_2s", + "Koha::Schema::Result::EdifactEan", + { "foreign.branchcode" => "self.branchcode" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 hold_fill_targets Type: has_many @@ -811,8 +826,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07048 @ 2021-11-20 03:03:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mir1TkkAHCxat1P/rgJGfg +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-22 14:08:17 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZcEwQFxe+ICwGRSfdGDhlA __PACKAGE__->add_columns( '+pickup_location' => { is_boolean => 1 } diff --git a/Koha/Schema/Result/EdifactEan.pm b/Koha/Schema/Result/EdifactEan.pm index 09fba9b32d..14b9bb2f8a 100644 --- a/Koha/Schema/Result/EdifactEan.pm +++ b/Koha/Schema/Result/EdifactEan.pm @@ -104,9 +104,29 @@ __PACKAGE__->belongs_to( }, ); +=head2 branchcode_2 -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-10-09 11:29:27 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9CSEvOmfmy52+QAYAgrybA +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "branchcode_2", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "RESTRICT", + on_update => "RESTRICT", + }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-22 14:08:17 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fTDDpPM5k8xP6UXo3YmIYA # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/EdifactMessage.pm b/Koha/Schema/Result/EdifactMessage.pm index db24e7468c..9655bdd948 100644 --- a/Koha/Schema/Result/EdifactMessage.pm +++ b/Koha/Schema/Result/EdifactMessage.pm @@ -146,6 +146,26 @@ __PACKAGE__->belongs_to( "basketno", "Koha::Schema::Result::Aqbasket", { basketno => "basketno" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "RESTRICT", + on_update => "RESTRICT", + }, +); + +=head2 basketno_2 + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "basketno_2", + "Koha::Schema::Result::Aqbasket", + { basketno => "basketno" }, { is_deferrable => 1, join_type => "LEFT", @@ -166,6 +186,26 @@ __PACKAGE__->belongs_to( "edi_acct", "Koha::Schema::Result::VendorEdiAccount", { id => "edi_acct" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "RESTRICT", + on_update => "RESTRICT", + }, +); + +=head2 edi_acct_2 + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "edi_acct_2", + "Koha::Schema::Result::VendorEdiAccount", + { id => "edi_acct" }, { is_deferrable => 1, join_type => "LEFT", @@ -186,6 +226,26 @@ __PACKAGE__->belongs_to( "vendor", "Koha::Schema::Result::Aqbookseller", { id => "vendor_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "RESTRICT", + on_update => "RESTRICT", + }, +); + +=head2 vendor_2 + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "vendor_2", + "Koha::Schema::Result::Aqbookseller", + { id => "vendor_id" }, { is_deferrable => 1, join_type => "LEFT", @@ -195,8 +255,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.07049 @ 2022-02-22 14:08:17 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A/Si6z6lih7nS39P5jTffA __PACKAGE__->add_columns( '+deleted' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/VendorEdiAccount.pm b/Koha/Schema/Result/VendorEdiAccount.pm index e8e7d810fc..0347b0b3d9 100644 --- a/Koha/Schema/Result/VendorEdiAccount.pm +++ b/Koha/Schema/Result/VendorEdiAccount.pm @@ -209,6 +209,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 edifact_messages_2s + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "edifact_messages_2s", + "Koha::Schema::Result::EdifactMessage", + { "foreign.edi_acct" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 shipment_budget Type: belongs_to @@ -229,6 +244,26 @@ __PACKAGE__->belongs_to( }, ); +=head2 shipment_budget_2 + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "shipment_budget_2", + "Koha::Schema::Result::Aqbudget", + { budget_id => "shipment_budget" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "RESTRICT", + on_update => "RESTRICT", + }, +); + =head2 vendor Type: belongs_to @@ -249,9 +284,29 @@ __PACKAGE__->belongs_to( }, ); +=head2 vendor_2 + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "vendor_2", + "Koha::Schema::Result::Aqbookseller", + { id => "vendor_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "RESTRICT", + on_update => "RESTRICT", + }, +); + -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:54 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TtWuTpP4Ac6/+T6OPMSsRA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-22 14:08:17 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5zy/v4ZvLwYZUumhADrD9w # You can replace this text with custom code or comments, and it will be preserved on regeneration -- 2.39.5