From 80dccab070c8a2a1ec4c9eeee0536c593b16d6d9 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Fri, 19 Nov 2021 16:01:46 -1000 Subject: [PATCH] Bug 29341: DBIC schema changes Signed-off-by: Fridolin Somers --- Koha/Schema/Result/Branch.pm | 34 +-------- Koha/Schema/Result/Category.pm | 19 +---- .../Schema/Result/PseudonymizedTransaction.pm | 75 ++----------------- 3 files changed, 9 insertions(+), 119 deletions(-) diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm index 04a4a11eb6..6194e20ca9 100644 --- a/Koha/Schema/Result/Branch.pm +++ b/Koha/Schema/Result/Branch.pm @@ -705,36 +705,6 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 pseudonymized_transactions_branchcodes - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "pseudonymized_transactions_branchcodes", - "Koha::Schema::Result::PseudonymizedTransaction", - { "foreign.branchcode" => "self.branchcode" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - -=head2 pseudonymized_transactions_transaction_branchcodes - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "pseudonymized_transactions_transaction_branchcodes", - "Koha::Schema::Result::PseudonymizedTransaction", - { "foreign.transaction_branchcode" => "self.branchcode" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - =head2 repeatable_holidays Type: has_many @@ -841,8 +811,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-11-11 14:23:25 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pOqM3Rfe/H4J+m1XxVfaUQ +# Created by DBIx::Class::Schema::Loader v0.07048 @ 2021-11-20 03:03:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mir1TkkAHCxat1P/rgJGfg __PACKAGE__->add_columns( '+pickup_location' => { is_boolean => 1 } diff --git a/Koha/Schema/Result/Category.pm b/Koha/Schema/Result/Category.pm index 0fdac2cc7c..a06bf08b64 100644 --- a/Koha/Schema/Result/Category.pm +++ b/Koha/Schema/Result/Category.pm @@ -286,24 +286,9 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 pseudonymized_transactions -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "pseudonymized_transactions", - "Koha::Schema::Result::PseudonymizedTransaction", - { "foreign.categorycode" => "self.categorycode" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - - -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-09-18 09:33:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ab4IZUfNu63C/SWLPXlMNg +# Created by DBIx::Class::Schema::Loader v0.07048 @ 2021-11-20 03:00:36 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ai4FRVkjkkt0aU6k5vqBiA __PACKAGE__->add_columns( '+exclude_from_local_holds_priority' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/PseudonymizedTransaction.pm b/Koha/Schema/Result/PseudonymizedTransaction.pm index ccbe7434a6..4170735f43 100644 --- a/Koha/Schema/Result/PseudonymizedTransaction.pm +++ b/Koha/Schema/Result/PseudonymizedTransaction.pm @@ -71,7 +71,6 @@ __PACKAGE__->table("pseudonymized_transactions"); data_type: 'varchar' default_value: (empty string) - is_foreign_key: 1 is_nullable: 0 size: 10 @@ -79,7 +78,6 @@ __PACKAGE__->table("pseudonymized_transactions"); data_type: 'varchar' default_value: (empty string) - is_foreign_key: 1 is_nullable: 0 size: 10 @@ -116,7 +114,6 @@ __PACKAGE__->table("pseudonymized_transactions"); =head2 transaction_branchcode data_type: 'varchar' - is_foreign_key: 1 is_nullable: 1 size: 10 @@ -187,21 +184,9 @@ __PACKAGE__->add_columns( "country", { data_type => "mediumtext", is_nullable => 1 }, "branchcode", - { - data_type => "varchar", - default_value => "", - is_foreign_key => 1, - is_nullable => 0, - size => 10, - }, + { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "categorycode", - { - data_type => "varchar", - default_value => "", - is_foreign_key => 1, - is_nullable => 0, - size => 10, - }, + { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "dateenrolled", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "sex", @@ -217,7 +202,7 @@ __PACKAGE__->add_columns( is_nullable => 1, }, "transaction_branchcode", - { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, + { data_type => "varchar", is_nullable => 1, size => 10 }, "transaction_type", { data_type => "varchar", is_nullable => 1, size => 16 }, "itemnumber", @@ -250,36 +235,6 @@ __PACKAGE__->set_primary_key("id"); =head1 RELATIONS -=head2 branchcode - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "branchcode", - "Koha::Schema::Result::Branch", - { branchcode => "branchcode" }, - { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, -); - -=head2 categorycode - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "categorycode", - "Koha::Schema::Result::Category", - { categorycode => "categorycode" }, - { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, -); - =head2 pseudonymized_borrower_attributes Type: has_many @@ -295,29 +250,9 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 transaction_branchcode - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "transaction_branchcode", - "Koha::Schema::Result::Branch", - { branchcode => "transaction_branchcode" }, - { - is_deferrable => 1, - join_type => "LEFT", - on_delete => "RESTRICT", - on_update => "RESTRICT", - }, -); - -# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-17 16:28:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jgUZi4W5vJo33KdKI7+jyQ +# Created by DBIx::Class::Schema::Loader v0.07048 @ 2021-11-20 03:00:36 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qlJ6ctu84c7AKZbxUNSGxw __PACKAGE__->add_columns( '+has_cardnumber' => { is_boolean => 1 }, -- 2.39.5