From 21d469bf2c6127dedda16635521a34c32ead2bfd Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Tue, 15 Aug 2023 13:52:19 -0300 Subject: [PATCH] Bug 32607: (follow-up) Apply new suggestions --- Koha/Schema/Result/Borrower.pm | 1075 +++++++++-------- .../data/mysql/atomicupdate/bug_32607.pl | 30 +- installer/data/mysql/kohastructure.sql | 2 +- .../prog/js/vue/components/Page.vue | 10 +- .../Edit.vue | 110 +- .../List.vue | 45 +- .../Main.vue | 12 +- .../prog/js/vue/fetch/record-sources.js | 11 + .../prog/js/vue/modules/record-sources.ts | 2 +- .../prog/js/vue/routes/record-sources.js | 27 +- .../prog/js/vue/stores/navigation.js | 32 +- 11 files changed, 689 insertions(+), 667 deletions(-) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/{record-sources => RecordSources}/Edit.vue (58%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/{record-sources => RecordSources}/List.vue (75%) rename koha-tmpl/intranet-tmpl/prog/js/vue/components/{record-sources => RecordSources}/Main.vue (51%) diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index e6d78158c2..9b6d3e4dd0 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -1,4 +1,5 @@ use utf8; + package Koha::Schema::Result::Borrower; # Created by DBIx::Class::Schema::Loader @@ -650,206 +651,206 @@ useful for reporting purposes =cut __PACKAGE__->add_columns( - "borrowernumber", - { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, - "cardnumber", - { data_type => "varchar", is_nullable => 1, size => 32 }, - "surname", - { data_type => "longtext", is_nullable => 1 }, - "firstname", - { data_type => "mediumtext", is_nullable => 1 }, - "middle_name", - { data_type => "longtext", is_nullable => 1 }, - "title", - { data_type => "longtext", is_nullable => 1 }, - "othernames", - { data_type => "longtext", is_nullable => 1 }, - "initials", - { data_type => "mediumtext", is_nullable => 1 }, - "pronouns", - { data_type => "longtext", is_nullable => 1 }, - "streetnumber", - { data_type => "tinytext", is_nullable => 1 }, - "streettype", - { data_type => "tinytext", is_nullable => 1 }, - "address", - { data_type => "longtext", is_nullable => 1 }, - "address2", - { data_type => "mediumtext", is_nullable => 1 }, - "city", - { data_type => "longtext", is_nullable => 1 }, - "state", - { data_type => "mediumtext", is_nullable => 1 }, - "zipcode", - { data_type => "tinytext", is_nullable => 1 }, - "country", - { data_type => "mediumtext", is_nullable => 1 }, - "email", - { data_type => "longtext", is_nullable => 1 }, - "phone", - { data_type => "mediumtext", is_nullable => 1 }, - "mobile", - { data_type => "tinytext", is_nullable => 1 }, - "fax", - { data_type => "longtext", is_nullable => 1 }, - "emailpro", - { data_type => "mediumtext", is_nullable => 1 }, - "phonepro", - { data_type => "mediumtext", is_nullable => 1 }, - "B_streetnumber", - { accessor => "b_streetnumber", data_type => "tinytext", is_nullable => 1 }, - "B_streettype", - { accessor => "b_streettype", data_type => "tinytext", is_nullable => 1 }, - "B_address", - { accessor => "b_address", data_type => "mediumtext", is_nullable => 1 }, - "B_address2", - { accessor => "b_address2", data_type => "mediumtext", is_nullable => 1 }, - "B_city", - { accessor => "b_city", data_type => "longtext", is_nullable => 1 }, - "B_state", - { accessor => "b_state", data_type => "mediumtext", is_nullable => 1 }, - "B_zipcode", - { accessor => "b_zipcode", data_type => "tinytext", is_nullable => 1 }, - "B_country", - { accessor => "b_country", data_type => "mediumtext", is_nullable => 1 }, - "B_email", - { accessor => "b_email", data_type => "mediumtext", is_nullable => 1 }, - "B_phone", - { accessor => "b_phone", data_type => "longtext", is_nullable => 1 }, - "dateofbirth", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, - "branchcode", - { - data_type => "varchar", - default_value => "", - is_foreign_key => 1, - is_nullable => 0, - size => 10, - }, - "categorycode", - { - data_type => "varchar", - default_value => "", - is_foreign_key => 1, - is_nullable => 0, - size => 10, - }, - "dateenrolled", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, - "dateexpiry", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, - "password_expiration_date", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, - "date_renewed", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, - "gonenoaddress", - { data_type => "tinyint", is_nullable => 1 }, - "lost", - { data_type => "tinyint", is_nullable => 1 }, - "debarred", - { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, - "debarredcomment", - { data_type => "varchar", is_nullable => 1, size => 255 }, - "contactname", - { data_type => "longtext", is_nullable => 1 }, - "contactfirstname", - { data_type => "mediumtext", is_nullable => 1 }, - "contacttitle", - { data_type => "mediumtext", is_nullable => 1 }, - "borrowernotes", - { data_type => "longtext", is_nullable => 1 }, - "relationship", - { data_type => "varchar", is_nullable => 1, size => 100 }, - "sex", - { data_type => "varchar", is_nullable => 1, size => 1 }, - "password", - { data_type => "varchar", is_nullable => 1, size => 60 }, - "secret", - { data_type => "mediumtext", is_nullable => 1 }, - "auth_method", - { - data_type => "enum", - default_value => "password", - extra => { list => ["password", "two-factor"] }, - is_nullable => 0, - }, - "flags", - { data_type => "bigint", is_nullable => 1 }, - "userid", - { data_type => "varchar", is_nullable => 1, size => 75 }, - "opacnote", - { data_type => "longtext", is_nullable => 1 }, - "contactnote", - { data_type => "varchar", is_nullable => 1, size => 255 }, - "sort1", - { data_type => "varchar", is_nullable => 1, size => 80 }, - "sort2", - { data_type => "varchar", is_nullable => 1, size => 80 }, - "altcontactfirstname", - { data_type => "mediumtext", is_nullable => 1 }, - "altcontactsurname", - { data_type => "mediumtext", is_nullable => 1 }, - "altcontactaddress1", - { data_type => "mediumtext", is_nullable => 1 }, - "altcontactaddress2", - { data_type => "mediumtext", is_nullable => 1 }, - "altcontactaddress3", - { data_type => "mediumtext", is_nullable => 1 }, - "altcontactstate", - { data_type => "mediumtext", is_nullable => 1 }, - "altcontactzipcode", - { data_type => "mediumtext", is_nullable => 1 }, - "altcontactcountry", - { data_type => "mediumtext", is_nullable => 1 }, - "altcontactphone", - { data_type => "mediumtext", is_nullable => 1 }, - "smsalertnumber", - { data_type => "varchar", is_nullable => 1, size => 50 }, - "sms_provider_id", - { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, - "privacy", - { data_type => "integer", default_value => 1, is_nullable => 0 }, - "privacy_guarantor_fines", - { data_type => "tinyint", default_value => 0, is_nullable => 0 }, - "privacy_guarantor_checkouts", - { data_type => "tinyint", default_value => 0, is_nullable => 0 }, - "checkprevcheckout", - { - data_type => "varchar", - default_value => "inherit", - is_nullable => 0, - size => 7, - }, - "updated_on", - { - data_type => "timestamp", - datetime_undef_if_invalid => 1, - default_value => \"current_timestamp", - is_nullable => 0, - }, - "lastseen", - { - data_type => "datetime", - datetime_undef_if_invalid => 1, - is_nullable => 1, - }, - "lang", - { - data_type => "varchar", - default_value => "default", - is_nullable => 0, - size => 25, - }, - "login_attempts", - { data_type => "integer", default_value => 0, is_nullable => 0 }, - "overdrive_auth_token", - { data_type => "mediumtext", is_nullable => 1 }, - "anonymized", - { data_type => "tinyint", default_value => 0, is_nullable => 0 }, - "autorenew_checkouts", - { data_type => "tinyint", default_value => 1, is_nullable => 0 }, - "primary_contact_method", - { data_type => "varchar", is_nullable => 1, size => 45 }, + "borrowernumber", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "cardnumber", + { data_type => "varchar", is_nullable => 1, size => 32 }, + "surname", + { data_type => "longtext", is_nullable => 1 }, + "firstname", + { data_type => "mediumtext", is_nullable => 1 }, + "middle_name", + { data_type => "longtext", is_nullable => 1 }, + "title", + { data_type => "longtext", is_nullable => 1 }, + "othernames", + { data_type => "longtext", is_nullable => 1 }, + "initials", + { data_type => "mediumtext", is_nullable => 1 }, + "pronouns", + { data_type => "longtext", is_nullable => 1 }, + "streetnumber", + { data_type => "tinytext", is_nullable => 1 }, + "streettype", + { data_type => "tinytext", is_nullable => 1 }, + "address", + { data_type => "longtext", is_nullable => 1 }, + "address2", + { data_type => "mediumtext", is_nullable => 1 }, + "city", + { data_type => "longtext", is_nullable => 1 }, + "state", + { data_type => "mediumtext", is_nullable => 1 }, + "zipcode", + { data_type => "tinytext", is_nullable => 1 }, + "country", + { data_type => "mediumtext", is_nullable => 1 }, + "email", + { data_type => "longtext", is_nullable => 1 }, + "phone", + { data_type => "mediumtext", is_nullable => 1 }, + "mobile", + { data_type => "tinytext", is_nullable => 1 }, + "fax", + { data_type => "longtext", is_nullable => 1 }, + "emailpro", + { data_type => "mediumtext", is_nullable => 1 }, + "phonepro", + { data_type => "mediumtext", is_nullable => 1 }, + "B_streetnumber", + { accessor => "b_streetnumber", data_type => "tinytext", is_nullable => 1 }, + "B_streettype", + { accessor => "b_streettype", data_type => "tinytext", is_nullable => 1 }, + "B_address", + { accessor => "b_address", data_type => "mediumtext", is_nullable => 1 }, + "B_address2", + { accessor => "b_address2", data_type => "mediumtext", is_nullable => 1 }, + "B_city", + { accessor => "b_city", data_type => "longtext", is_nullable => 1 }, + "B_state", + { accessor => "b_state", data_type => "mediumtext", is_nullable => 1 }, + "B_zipcode", + { accessor => "b_zipcode", data_type => "tinytext", is_nullable => 1 }, + "B_country", + { accessor => "b_country", data_type => "mediumtext", is_nullable => 1 }, + "B_email", + { accessor => "b_email", data_type => "mediumtext", is_nullable => 1 }, + "B_phone", + { accessor => "b_phone", data_type => "longtext", is_nullable => 1 }, + "dateofbirth", + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, + "branchcode", + { + data_type => "varchar", + default_value => "", + is_foreign_key => 1, + is_nullable => 0, + size => 10, + }, + "categorycode", + { + data_type => "varchar", + default_value => "", + is_foreign_key => 1, + is_nullable => 0, + size => 10, + }, + "dateenrolled", + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, + "dateexpiry", + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, + "password_expiration_date", + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, + "date_renewed", + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, + "gonenoaddress", + { data_type => "tinyint", is_nullable => 1 }, + "lost", + { data_type => "tinyint", is_nullable => 1 }, + "debarred", + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, + "debarredcomment", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "contactname", + { data_type => "longtext", is_nullable => 1 }, + "contactfirstname", + { data_type => "mediumtext", is_nullable => 1 }, + "contacttitle", + { data_type => "mediumtext", is_nullable => 1 }, + "borrowernotes", + { data_type => "longtext", is_nullable => 1 }, + "relationship", + { data_type => "varchar", is_nullable => 1, size => 100 }, + "sex", + { data_type => "varchar", is_nullable => 1, size => 1 }, + "password", + { data_type => "varchar", is_nullable => 1, size => 60 }, + "secret", + { data_type => "mediumtext", is_nullable => 1 }, + "auth_method", + { + data_type => "enum", + default_value => "password", + extra => { list => [ "password", "two-factor" ] }, + is_nullable => 0, + }, + "flags", + { data_type => "bigint", is_nullable => 1 }, + "userid", + { data_type => "varchar", is_nullable => 1, size => 75 }, + "opacnote", + { data_type => "longtext", is_nullable => 1 }, + "contactnote", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "sort1", + { data_type => "varchar", is_nullable => 1, size => 80 }, + "sort2", + { data_type => "varchar", is_nullable => 1, size => 80 }, + "altcontactfirstname", + { data_type => "mediumtext", is_nullable => 1 }, + "altcontactsurname", + { data_type => "mediumtext", is_nullable => 1 }, + "altcontactaddress1", + { data_type => "mediumtext", is_nullable => 1 }, + "altcontactaddress2", + { data_type => "mediumtext", is_nullable => 1 }, + "altcontactaddress3", + { data_type => "mediumtext", is_nullable => 1 }, + "altcontactstate", + { data_type => "mediumtext", is_nullable => 1 }, + "altcontactzipcode", + { data_type => "mediumtext", is_nullable => 1 }, + "altcontactcountry", + { data_type => "mediumtext", is_nullable => 1 }, + "altcontactphone", + { data_type => "mediumtext", is_nullable => 1 }, + "smsalertnumber", + { data_type => "varchar", is_nullable => 1, size => 50 }, + "sms_provider_id", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, + "privacy", + { data_type => "integer", default_value => 1, is_nullable => 0 }, + "privacy_guarantor_fines", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "privacy_guarantor_checkouts", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "checkprevcheckout", + { + data_type => "varchar", + default_value => "inherit", + is_nullable => 0, + size => 7, + }, + "updated_on", + { + data_type => "timestamp", + datetime_undef_if_invalid => 1, + default_value => \"current_timestamp", + is_nullable => 0, + }, + "lastseen", + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, + "lang", + { + data_type => "varchar", + default_value => "default", + is_nullable => 0, + size => 25, + }, + "login_attempts", + { data_type => "integer", default_value => 0, is_nullable => 0 }, + "overdrive_auth_token", + { data_type => "mediumtext", is_nullable => 1 }, + "anonymized", + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, + "autorenew_checkouts", + { data_type => "tinyint", default_value => 1, is_nullable => 0 }, + "primary_contact_method", + { data_type => "varchar", is_nullable => 1, size => 45 }, ); =head1 PRIMARY KEY @@ -876,7 +877,7 @@ __PACKAGE__->set_primary_key("borrowernumber"); =cut -__PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]); +__PACKAGE__->add_unique_constraint( "cardnumber", ["cardnumber"] ); =head2 C @@ -888,7 +889,7 @@ __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]); =cut -__PACKAGE__->add_unique_constraint("userid", ["userid"]); +__PACKAGE__->add_unique_constraint( "userid", ["userid"] ); =head1 RELATIONS @@ -901,10 +902,10 @@ Related object: L =cut __PACKAGE__->has_many( - "accountlines", - "Koha::Schema::Result::Accountline", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "accountlines", + "Koha::Schema::Result::Accountline", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 accountlines_managers @@ -916,10 +917,10 @@ Related object: L =cut __PACKAGE__->has_many( - "accountlines_managers", - "Koha::Schema::Result::Accountline", - { "foreign.manager_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "accountlines_managers", + "Koha::Schema::Result::Accountline", + { "foreign.manager_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 additional_contents @@ -931,10 +932,10 @@ Related object: L =cut __PACKAGE__->has_many( - "additional_contents", - "Koha::Schema::Result::AdditionalContent", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "additional_contents", + "Koha::Schema::Result::AdditionalContent", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 advanced_editor_macros @@ -946,10 +947,10 @@ Related object: L =cut __PACKAGE__->has_many( - "advanced_editor_macros", - "Koha::Schema::Result::AdvancedEditorMacro", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "advanced_editor_macros", + "Koha::Schema::Result::AdvancedEditorMacro", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 alerts @@ -961,10 +962,10 @@ Related object: L =cut __PACKAGE__->has_many( - "alerts", - "Koha::Schema::Result::Alert", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "alerts", + "Koha::Schema::Result::Alert", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 api_keys @@ -976,10 +977,10 @@ Related object: L =cut __PACKAGE__->has_many( - "api_keys", - "Koha::Schema::Result::ApiKey", - { "foreign.patron_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "api_keys", + "Koha::Schema::Result::ApiKey", + { "foreign.patron_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 aqbasketusers @@ -991,10 +992,10 @@ Related object: L =cut __PACKAGE__->has_many( - "aqbasketusers", - "Koha::Schema::Result::Aqbasketuser", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "aqbasketusers", + "Koha::Schema::Result::Aqbasketuser", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 aqbudgetborrowers @@ -1006,10 +1007,10 @@ Related object: L =cut __PACKAGE__->has_many( - "aqbudgetborrowers", - "Koha::Schema::Result::Aqbudgetborrower", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "aqbudgetborrowers", + "Koha::Schema::Result::Aqbudgetborrower", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 aqorder_users @@ -1021,10 +1022,10 @@ Related object: L =cut __PACKAGE__->has_many( - "aqorder_users", - "Koha::Schema::Result::AqorderUser", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "aqorder_users", + "Koha::Schema::Result::AqorderUser", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 aqorders @@ -1036,10 +1037,10 @@ Related object: L =cut __PACKAGE__->has_many( - "aqorders", - "Koha::Schema::Result::Aqorder", - { "foreign.created_by" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "aqorders", + "Koha::Schema::Result::Aqorder", + { "foreign.created_by" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 article_requests @@ -1051,10 +1052,10 @@ Related object: L =cut __PACKAGE__->has_many( - "article_requests", - "Koha::Schema::Result::ArticleRequest", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "article_requests", + "Koha::Schema::Result::ArticleRequest", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 borrower_attributes @@ -1066,10 +1067,10 @@ Related object: L =cut __PACKAGE__->has_many( - "borrower_attributes", - "Koha::Schema::Result::BorrowerAttribute", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "borrower_attributes", + "Koha::Schema::Result::BorrowerAttribute", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 borrower_debarments @@ -1081,10 +1082,10 @@ Related object: L =cut __PACKAGE__->has_many( - "borrower_debarments", - "Koha::Schema::Result::BorrowerDebarment", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "borrower_debarments", + "Koha::Schema::Result::BorrowerDebarment", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 borrower_files @@ -1096,10 +1097,10 @@ Related object: L =cut __PACKAGE__->has_many( - "borrower_files", - "Koha::Schema::Result::BorrowerFile", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "borrower_files", + "Koha::Schema::Result::BorrowerFile", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 borrower_message_preferences @@ -1111,10 +1112,10 @@ Related object: L =cut __PACKAGE__->has_many( - "borrower_message_preferences", - "Koha::Schema::Result::BorrowerMessagePreference", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "borrower_message_preferences", + "Koha::Schema::Result::BorrowerMessagePreference", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 borrower_relationships_guarantees @@ -1126,10 +1127,10 @@ Related object: L =cut __PACKAGE__->has_many( - "borrower_relationships_guarantees", - "Koha::Schema::Result::BorrowerRelationship", - { "foreign.guarantee_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "borrower_relationships_guarantees", + "Koha::Schema::Result::BorrowerRelationship", + { "foreign.guarantee_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 borrower_relationships_guarantors @@ -1141,10 +1142,10 @@ Related object: L =cut __PACKAGE__->has_many( - "borrower_relationships_guarantors", - "Koha::Schema::Result::BorrowerRelationship", - { "foreign.guarantor_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "borrower_relationships_guarantors", + "Koha::Schema::Result::BorrowerRelationship", + { "foreign.guarantor_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 branchcode @@ -1156,10 +1157,10 @@ Related object: L =cut __PACKAGE__->belongs_to( - "branchcode", - "Koha::Schema::Result::Branch", - { branchcode => "branchcode" }, - { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, + "branchcode", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, ); =head2 cash_register_actions @@ -1171,10 +1172,10 @@ Related object: L =cut __PACKAGE__->has_many( - "cash_register_actions", - "Koha::Schema::Result::CashRegisterAction", - { "foreign.manager_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "cash_register_actions", + "Koha::Schema::Result::CashRegisterAction", + { "foreign.manager_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 categorycode @@ -1186,10 +1187,10 @@ Related object: L =cut __PACKAGE__->belongs_to( - "categorycode", - "Koha::Schema::Result::Category", - { categorycode => "categorycode" }, - { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, + "categorycode", + "Koha::Schema::Result::Category", + { categorycode => "categorycode" }, + { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" }, ); =head2 checkout_renewals @@ -1201,10 +1202,10 @@ Related object: L =cut __PACKAGE__->has_many( - "checkout_renewals", - "Koha::Schema::Result::CheckoutRenewal", - { "foreign.renewer_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "checkout_renewals", + "Koha::Schema::Result::CheckoutRenewal", + { "foreign.renewer_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 club_enrollments @@ -1216,10 +1217,10 @@ Related object: L =cut __PACKAGE__->has_many( - "club_enrollments", - "Koha::Schema::Result::ClubEnrollment", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "club_enrollments", + "Koha::Schema::Result::ClubEnrollment", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 club_holds_to_patron_holds @@ -1231,10 +1232,10 @@ Related object: L =cut __PACKAGE__->has_many( - "club_holds_to_patron_holds", - "Koha::Schema::Result::ClubHoldsToPatronHold", - { "foreign.patron_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "club_holds_to_patron_holds", + "Koha::Schema::Result::ClubHoldsToPatronHold", + { "foreign.patron_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 course_instructors @@ -1246,10 +1247,10 @@ Related object: L =cut __PACKAGE__->has_many( - "course_instructors", - "Koha::Schema::Result::CourseInstructor", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "course_instructors", + "Koha::Schema::Result::CourseInstructor", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 creator_batches @@ -1261,10 +1262,10 @@ Related object: L =cut __PACKAGE__->has_many( - "creator_batches", - "Koha::Schema::Result::CreatorBatch", - { "foreign.borrower_number" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "creator_batches", + "Koha::Schema::Result::CreatorBatch", + { "foreign.borrower_number" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 curbside_pickups_borrowernumbers @@ -1276,10 +1277,10 @@ Related object: L =cut __PACKAGE__->has_many( - "curbside_pickups_borrowernumbers", - "Koha::Schema::Result::CurbsidePickup", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "curbside_pickups_borrowernumbers", + "Koha::Schema::Result::CurbsidePickup", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 curbside_pickups_staged_by @@ -1291,10 +1292,10 @@ Related object: L =cut __PACKAGE__->has_many( - "curbside_pickups_staged_by", - "Koha::Schema::Result::CurbsidePickup", - { "foreign.staged_by" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "curbside_pickups_staged_by", + "Koha::Schema::Result::CurbsidePickup", + { "foreign.staged_by" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 discharges @@ -1306,10 +1307,10 @@ Related object: L =cut __PACKAGE__->has_many( - "discharges", - "Koha::Schema::Result::Discharge", - { "foreign.borrower" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "discharges", + "Koha::Schema::Result::Discharge", + { "foreign.borrower" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 erm_user_roles @@ -1321,10 +1322,10 @@ Related object: L =cut __PACKAGE__->has_many( - "erm_user_roles", - "Koha::Schema::Result::ErmUserRole", - { "foreign.user_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "erm_user_roles", + "Koha::Schema::Result::ErmUserRole", + { "foreign.user_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 hold_fill_targets @@ -1336,10 +1337,10 @@ Related object: L =cut __PACKAGE__->has_many( - "hold_fill_targets", - "Koha::Schema::Result::HoldFillTarget", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "hold_fill_targets", + "Koha::Schema::Result::HoldFillTarget", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 housebound_profile @@ -1351,10 +1352,10 @@ Related object: L =cut __PACKAGE__->might_have( - "housebound_profile", - "Koha::Schema::Result::HouseboundProfile", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "housebound_profile", + "Koha::Schema::Result::HouseboundProfile", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 housebound_role @@ -1366,10 +1367,10 @@ Related object: L =cut __PACKAGE__->might_have( - "housebound_role", - "Koha::Schema::Result::HouseboundRole", - { "foreign.borrowernumber_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "housebound_role", + "Koha::Schema::Result::HouseboundRole", + { "foreign.borrowernumber_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 housebound_visit_chooser_brwnumbers @@ -1381,10 +1382,10 @@ Related object: L =cut __PACKAGE__->has_many( - "housebound_visit_chooser_brwnumbers", - "Koha::Schema::Result::HouseboundVisit", - { "foreign.chooser_brwnumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "housebound_visit_chooser_brwnumbers", + "Koha::Schema::Result::HouseboundVisit", + { "foreign.chooser_brwnumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 housebound_visit_deliverer_brwnumbers @@ -1396,10 +1397,10 @@ Related object: L =cut __PACKAGE__->has_many( - "housebound_visit_deliverer_brwnumbers", - "Koha::Schema::Result::HouseboundVisit", - { "foreign.deliverer_brwnumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "housebound_visit_deliverer_brwnumbers", + "Koha::Schema::Result::HouseboundVisit", + { "foreign.deliverer_brwnumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 illcomments @@ -1411,10 +1412,10 @@ Related object: L =cut __PACKAGE__->has_many( - "illcomments", - "Koha::Schema::Result::Illcomment", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "illcomments", + "Koha::Schema::Result::Illcomment", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 illrequests @@ -1426,10 +1427,10 @@ Related object: L =cut __PACKAGE__->has_many( - "illrequests", - "Koha::Schema::Result::Illrequest", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "illrequests", + "Koha::Schema::Result::Illrequest", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 issues @@ -1441,10 +1442,10 @@ Related object: L =cut __PACKAGE__->has_many( - "issues", - "Koha::Schema::Result::Issue", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "issues", + "Koha::Schema::Result::Issue", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 issues_issuers @@ -1456,10 +1457,10 @@ Related object: L =cut __PACKAGE__->has_many( - "issues_issuers", - "Koha::Schema::Result::Issue", - { "foreign.issuer_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "issues_issuers", + "Koha::Schema::Result::Issue", + { "foreign.issuer_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 item_editor_templates @@ -1471,10 +1472,10 @@ Related object: L =cut __PACKAGE__->has_many( - "item_editor_templates", - "Koha::Schema::Result::ItemEditorTemplate", - { "foreign.patron_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "item_editor_templates", + "Koha::Schema::Result::ItemEditorTemplate", + { "foreign.patron_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 items_last_borrowers @@ -1486,10 +1487,10 @@ Related object: L =cut __PACKAGE__->has_many( - "items_last_borrowers", - "Koha::Schema::Result::ItemsLastBorrower", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "items_last_borrowers", + "Koha::Schema::Result::ItemsLastBorrower", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 linktrackers @@ -1501,10 +1502,10 @@ Related object: L =cut __PACKAGE__->has_many( - "linktrackers", - "Koha::Schema::Result::Linktracker", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "linktrackers", + "Koha::Schema::Result::Linktracker", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 message_queues @@ -1516,10 +1517,10 @@ Related object: L =cut __PACKAGE__->has_many( - "message_queues", - "Koha::Schema::Result::MessageQueue", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "message_queues", + "Koha::Schema::Result::MessageQueue", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 messages @@ -1531,10 +1532,10 @@ Related object: L =cut __PACKAGE__->has_many( - "messages", - "Koha::Schema::Result::Message", - { "foreign.manager_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "messages", + "Koha::Schema::Result::Message", + { "foreign.manager_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 messages_borrowernumbers @@ -1546,10 +1547,10 @@ Related object: L =cut __PACKAGE__->has_many( - "messages_borrowernumbers", - "Koha::Schema::Result::Message", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "messages_borrowernumbers", + "Koha::Schema::Result::Message", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 old_issues @@ -1561,10 +1562,10 @@ Related object: L =cut __PACKAGE__->has_many( - "old_issues", - "Koha::Schema::Result::OldIssue", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "old_issues", + "Koha::Schema::Result::OldIssue", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 old_issues_issuers @@ -1576,10 +1577,10 @@ Related object: L =cut __PACKAGE__->has_many( - "old_issues_issuers", - "Koha::Schema::Result::OldIssue", - { "foreign.issuer_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "old_issues_issuers", + "Koha::Schema::Result::OldIssue", + { "foreign.issuer_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 old_reserves @@ -1591,10 +1592,10 @@ Related object: L =cut __PACKAGE__->has_many( - "old_reserves", - "Koha::Schema::Result::OldReserve", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "old_reserves", + "Koha::Schema::Result::OldReserve", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 patron_consents @@ -1606,10 +1607,10 @@ Related object: L =cut __PACKAGE__->has_many( - "patron_consents", - "Koha::Schema::Result::PatronConsent", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "patron_consents", + "Koha::Schema::Result::PatronConsent", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 patron_list_patrons @@ -1621,10 +1622,10 @@ Related object: L =cut __PACKAGE__->has_many( - "patron_list_patrons", - "Koha::Schema::Result::PatronListPatron", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "patron_list_patrons", + "Koha::Schema::Result::PatronListPatron", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 patron_lists @@ -1636,10 +1637,10 @@ Related object: L =cut __PACKAGE__->has_many( - "patron_lists", - "Koha::Schema::Result::PatronList", - { "foreign.owner" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "patron_lists", + "Koha::Schema::Result::PatronList", + { "foreign.owner" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 patronimage @@ -1651,10 +1652,10 @@ Related object: L =cut __PACKAGE__->might_have( - "patronimage", - "Koha::Schema::Result::Patronimage", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "patronimage", + "Koha::Schema::Result::Patronimage", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 problem_reports @@ -1666,10 +1667,10 @@ Related object: L =cut __PACKAGE__->has_many( - "problem_reports", - "Koha::Schema::Result::ProblemReport", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "problem_reports", + "Koha::Schema::Result::ProblemReport", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 ratings @@ -1681,10 +1682,10 @@ Related object: L =cut __PACKAGE__->has_many( - "ratings", - "Koha::Schema::Result::Rating", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "ratings", + "Koha::Schema::Result::Rating", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 recalls @@ -1696,10 +1697,10 @@ Related object: L =cut __PACKAGE__->has_many( - "recalls", - "Koha::Schema::Result::Recall", - { "foreign.patron_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "recalls", + "Koha::Schema::Result::Recall", + { "foreign.patron_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 record_sources @@ -1711,10 +1712,10 @@ Related object: L =cut __PACKAGE__->has_many( - "record_sources", - "Koha::Schema::Result::RecordSource", - { "foreign.patron_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "record_sources", + "Koha::Schema::Result::RecordSource", + { "foreign.patron_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 reserves @@ -1726,10 +1727,10 @@ Related object: L =cut __PACKAGE__->has_many( - "reserves", - "Koha::Schema::Result::Reserve", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "reserves", + "Koha::Schema::Result::Reserve", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 return_claims_borrowernumbers @@ -1741,10 +1742,10 @@ Related object: L =cut __PACKAGE__->has_many( - "return_claims_borrowernumbers", - "Koha::Schema::Result::ReturnClaim", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "return_claims_borrowernumbers", + "Koha::Schema::Result::ReturnClaim", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 return_claims_created_by @@ -1756,10 +1757,10 @@ Related object: L =cut __PACKAGE__->has_many( - "return_claims_created_by", - "Koha::Schema::Result::ReturnClaim", - { "foreign.created_by" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "return_claims_created_by", + "Koha::Schema::Result::ReturnClaim", + { "foreign.created_by" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 return_claims_resolved_by @@ -1771,10 +1772,10 @@ Related object: L =cut __PACKAGE__->has_many( - "return_claims_resolved_by", - "Koha::Schema::Result::ReturnClaim", - { "foreign.resolved_by" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "return_claims_resolved_by", + "Koha::Schema::Result::ReturnClaim", + { "foreign.resolved_by" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 return_claims_updated_by @@ -1786,10 +1787,10 @@ Related object: L =cut __PACKAGE__->has_many( - "return_claims_updated_by", - "Koha::Schema::Result::ReturnClaim", - { "foreign.updated_by" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "return_claims_updated_by", + "Koha::Schema::Result::ReturnClaim", + { "foreign.updated_by" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 reviews @@ -1801,10 +1802,10 @@ Related object: L =cut __PACKAGE__->has_many( - "reviews", - "Koha::Schema::Result::Review", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "reviews", + "Koha::Schema::Result::Review", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 sms_provider @@ -1816,15 +1817,15 @@ Related object: L =cut __PACKAGE__->belongs_to( - "sms_provider", - "Koha::Schema::Result::SmsProvider", - { id => "sms_provider_id" }, - { - is_deferrable => 1, - join_type => "LEFT", - on_delete => "SET NULL", - on_update => "CASCADE", - }, + "sms_provider", + "Koha::Schema::Result::SmsProvider", + { id => "sms_provider_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "SET NULL", + on_update => "CASCADE", + }, ); =head2 subscriptionroutinglists @@ -1836,10 +1837,10 @@ Related object: L =cut __PACKAGE__->has_many( - "subscriptionroutinglists", - "Koha::Schema::Result::Subscriptionroutinglist", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "subscriptionroutinglists", + "Koha::Schema::Result::Subscriptionroutinglist", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 suggestions_acceptedbies @@ -1851,10 +1852,10 @@ Related object: L =cut __PACKAGE__->has_many( - "suggestions_acceptedbies", - "Koha::Schema::Result::Suggestion", - { "foreign.acceptedby" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "suggestions_acceptedbies", + "Koha::Schema::Result::Suggestion", + { "foreign.acceptedby" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 suggestions_lastmodificationbies @@ -1866,10 +1867,10 @@ Related object: L =cut __PACKAGE__->has_many( - "suggestions_lastmodificationbies", - "Koha::Schema::Result::Suggestion", - { "foreign.lastmodificationby" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "suggestions_lastmodificationbies", + "Koha::Schema::Result::Suggestion", + { "foreign.lastmodificationby" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 suggestions_managedbies @@ -1881,10 +1882,10 @@ Related object: L =cut __PACKAGE__->has_many( - "suggestions_managedbies", - "Koha::Schema::Result::Suggestion", - { "foreign.managedby" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "suggestions_managedbies", + "Koha::Schema::Result::Suggestion", + { "foreign.managedby" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 suggestions_rejectedbies @@ -1896,10 +1897,10 @@ Related object: L =cut __PACKAGE__->has_many( - "suggestions_rejectedbies", - "Koha::Schema::Result::Suggestion", - { "foreign.rejectedby" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "suggestions_rejectedbies", + "Koha::Schema::Result::Suggestion", + { "foreign.rejectedby" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 suggestions_suggestedbies @@ -1911,10 +1912,10 @@ Related object: L =cut __PACKAGE__->has_many( - "suggestions_suggestedbies", - "Koha::Schema::Result::Suggestion", - { "foreign.suggestedby" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "suggestions_suggestedbies", + "Koha::Schema::Result::Suggestion", + { "foreign.suggestedby" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 tags_all @@ -1926,10 +1927,10 @@ Related object: L =cut __PACKAGE__->has_many( - "tags_all", - "Koha::Schema::Result::TagAll", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "tags_all", + "Koha::Schema::Result::TagAll", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 tags_approvals @@ -1941,10 +1942,10 @@ Related object: L =cut __PACKAGE__->has_many( - "tags_approvals", - "Koha::Schema::Result::TagsApproval", - { "foreign.approved_by" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "tags_approvals", + "Koha::Schema::Result::TagsApproval", + { "foreign.approved_by" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 ticket_updates @@ -1956,10 +1957,10 @@ Related object: L =cut __PACKAGE__->has_many( - "ticket_updates", - "Koha::Schema::Result::TicketUpdate", - { "foreign.user_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "ticket_updates", + "Koha::Schema::Result::TicketUpdate", + { "foreign.user_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 tickets_reporters @@ -1971,10 +1972,10 @@ Related object: L =cut __PACKAGE__->has_many( - "tickets_reporters", - "Koha::Schema::Result::Ticket", - { "foreign.reporter_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "tickets_reporters", + "Koha::Schema::Result::Ticket", + { "foreign.reporter_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 tickets_resolvers @@ -1986,10 +1987,10 @@ Related object: L =cut __PACKAGE__->has_many( - "tickets_resolvers", - "Koha::Schema::Result::Ticket", - { "foreign.resolver_id" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "tickets_resolvers", + "Koha::Schema::Result::Ticket", + { "foreign.resolver_id" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 tmp_holdsqueues @@ -2001,10 +2002,10 @@ Related object: L =cut __PACKAGE__->has_many( - "tmp_holdsqueues", - "Koha::Schema::Result::TmpHoldsqueue", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "tmp_holdsqueues", + "Koha::Schema::Result::TmpHoldsqueue", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 user_permissions @@ -2016,10 +2017,10 @@ Related object: L =cut __PACKAGE__->has_many( - "user_permissions", - "Koha::Schema::Result::UserPermission", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "user_permissions", + "Koha::Schema::Result::UserPermission", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 virtualshelfcontents @@ -2031,10 +2032,10 @@ Related object: L =cut __PACKAGE__->has_many( - "virtualshelfcontents", - "Koha::Schema::Result::Virtualshelfcontent", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "virtualshelfcontents", + "Koha::Schema::Result::Virtualshelfcontent", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 virtualshelfshares @@ -2046,10 +2047,10 @@ Related object: L =cut __PACKAGE__->has_many( - "virtualshelfshares", - "Koha::Schema::Result::Virtualshelfshare", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "virtualshelfshares", + "Koha::Schema::Result::Virtualshelfshare", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 virtualshelves @@ -2061,10 +2062,10 @@ Related object: L =cut __PACKAGE__->has_many( - "virtualshelves", - "Koha::Schema::Result::Virtualshelve", - { "foreign.owner" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "virtualshelves", + "Koha::Schema::Result::Virtualshelve", + { "foreign.owner" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 basketnoes @@ -2075,7 +2076,7 @@ Composing rels: L -> basketno =cut -__PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno"); +__PACKAGE__->many_to_many( "basketnoes", "aqbasketusers", "basketno" ); =head2 budgets @@ -2085,7 +2086,7 @@ Composing rels: L -> budget =cut -__PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget"); +__PACKAGE__->many_to_many( "budgets", "aqbudgetborrowers", "budget" ); =head2 courses @@ -2095,7 +2096,7 @@ Composing rels: L -> course =cut -__PACKAGE__->many_to_many("courses", "course_instructors", "course"); +__PACKAGE__->many_to_many( "courses", "course_instructors", "course" ); =head2 ordernumbers @@ -2105,7 +2106,7 @@ Composing rels: L -> ordernumber =cut -__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); +__PACKAGE__->many_to_many( "ordernumbers", "aqorder_users", "ordernumber" ); =head2 permissions @@ -2115,37 +2116,37 @@ Composing rels: L -> permission =cut -__PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); - +__PACKAGE__->many_to_many( "permissions", "user_permissions", "permission" ); # Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-07-27 20:42:58 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ozXW5ny1kN3YQGJUEiqg9A __PACKAGE__->has_many( - "restrictions", - "Koha::Schema::Result::BorrowerDebarment", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "restrictions", + "Koha::Schema::Result::BorrowerDebarment", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); __PACKAGE__->has_many( - "extended_attributes", - "Koha::Schema::Result::BorrowerAttribute", - { "foreign.borrowernumber" => "self.borrowernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + "extended_attributes", + "Koha::Schema::Result::BorrowerAttribute", + { "foreign.borrowernumber" => "self.borrowernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); __PACKAGE__->add_columns( - '+anonymized' => { is_boolean => 1 }, - '+lost' => { is_boolean => 1 }, - '+gonenoaddress' => { is_boolean => 1 }, + '+anonymized' => { is_boolean => 1 }, + '+lost' => { is_boolean => 1 }, + '+gonenoaddress' => { is_boolean => 1 }, '+privacy_guarantor_fines' => { is_boolean => 1 }, - '+autorenew_checkouts' => { is_boolean => 1 } + '+autorenew_checkouts' => { is_boolean => 1 } ); sub koha_objects_class { 'Koha::Patrons'; } + sub koha_object_class { 'Koha::Patron'; } diff --git a/installer/data/mysql/atomicupdate/bug_32607.pl b/installer/data/mysql/atomicupdate/bug_32607.pl index 9106eb41ab..85a3a5b677 100755 --- a/installer/data/mysql/atomicupdate/bug_32607.pl +++ b/installer/data/mysql/atomicupdate/bug_32607.pl @@ -1,37 +1,35 @@ use Modern::Perl; return { - bug_number => "32607", + bug_number => "32607", description => "Add record_sources table", - up => sub { + up => sub { my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; - # Do you stuffs here - if(!TableExists('record_sources')) { - $dbh->do(q{ - -- - -- Table structure for table `record_sources` - -- + my ( $dbh, $out ) = @$args{qw(dbh out)}; - DROP TABLE IF EXISTS `record_sources`; - /*!40101 SET @saved_cs_client = @@character_set_client */; - /*!40101 SET character_set_client = utf8 */; + # Do you stuffs here + if ( !TableExists('record_sources') ) { + $dbh->do( + q{ CREATE TABLE `record_sources` ( `record_source_id` int(11) NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `patron_id` int(11) NOT NULL, PRIMARY KEY (`record_source_id`), - CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - }); + } + ); } say $out "Added new record_sources table"; - $dbh->do(q{ + $dbh->do( + q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_record_sources', 'Manage record sources') - }); + } + ); say $out "Added new manage_record_sources permission"; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 2769165d33..d76f1e9ce8 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3479,7 +3479,7 @@ CREATE TABLE `record_sources` ( `name` text NOT NULL, `patron_id` int(11) NOT NULL, PRIMARY KEY (`record_source_id`), - CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `record_source_fk_1` FOREIGN KEY (`patron_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -- Table structure for table `import_record_matches` diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Page.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Page.vue index c0c607b1cc..b31d8c553b 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Page.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Page.vue @@ -1,7 +1,7 @@