Bugzilla – Attachment 193358 Details for
Bug 39658
Allow definition of non-hierarchical linked patron accounts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39658: DBIC schema - DO NOT PUSH
Bug-39658-DBIC-schema---DO-NOT-PUSH.patch (text/plain), 4.01 KB, created by
Jacob O'Mara
on 2026-02-18 14:20:59 UTC
(
hide
)
Description:
Bug 39658: DBIC schema - DO NOT PUSH
Filename:
MIME Type:
Creator:
Jacob O'Mara
Created:
2026-02-18 14:20:59 UTC
Size:
4.01 KB
patch
obsolete
>From 74e746298e61a9f38c8503675407a050a9ac2932 Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <Jacob.omara@openfifth.co.uk> >Date: Wed, 21 Jan 2026 15:36:17 +0000 >Subject: [PATCH] Bug 39658: DBIC schema - DO NOT PUSH > >Auto-generated schema for patron_account_links table. >--- > Koha/Schema/Result/Borrower.pm | 19 +++- > Koha/Schema/Result/PatronAccountLink.pm | 125 ++++++++++++++++++++++++ > 2 files changed, 142 insertions(+), 2 deletions(-) > create mode 100644 Koha/Schema/Result/PatronAccountLink.pm > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 2c8bf77f78b..28b253e629f 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1676,6 +1676,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 patron_account_link >+ >+Type: might_have >+ >+Related object: L<Koha::Schema::Result::PatronAccountLink> >+ >+=cut >+ >+__PACKAGE__->might_have( >+ "patron_account_link", >+ "Koha::Schema::Result::PatronAccountLink", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 patron_consents > > Type: has_many >@@ -2212,8 +2227,8 @@ Composing rels: L</user_permissions> -> permission > __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-10-29 16:44:27 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SSJcjPvlr82qecmbk1Q8iA >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-01-19 13:41:13 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ri+7zHVsNeXiewOHao3A1Q > > __PACKAGE__->belongs_to( > "library", >diff --git a/Koha/Schema/Result/PatronAccountLink.pm b/Koha/Schema/Result/PatronAccountLink.pm >new file mode 100644 >index 00000000000..13aa0d149ed >--- /dev/null >+++ b/Koha/Schema/Result/PatronAccountLink.pm >@@ -0,0 +1,125 @@ >+use utf8; >+package Koha::Schema::Result::PatronAccountLink; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::PatronAccountLink >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<patron_account_links> >+ >+=cut >+ >+__PACKAGE__->table("patron_account_links"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+primary key >+ >+=head2 link_group_id >+ >+ data_type: 'integer' >+ is_nullable: 0 >+ >+groups linked accounts together >+ >+=head2 borrowernumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+foreign key to borrowers table >+ >+=head2 created_on >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+when the link was created >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "link_group_id", >+ { data_type => "integer", is_nullable => 0 }, >+ "borrowernumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "created_on", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<borrowernumber> >+ >+=over 4 >+ >+=item * L</borrowernumber> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("borrowernumber", ["borrowernumber"]); >+ >+=head1 RELATIONS >+ >+=head2 borrowernumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "borrowernumber", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "borrowernumber" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2026-01-19 13:41:13 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iWUPjrtWP7qqlIJZJ7kOuA >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39658
:
193344
|
193345
|
193346
|
193347
|
193348
|
193349
|
193350
|
193351
|
193352
|
193353
|
193354
|
193355
|
193356
|
193357
|
193358
|
193359
|
193462
|
193463
|
193464
|
193465
|
193466
|
193467
|
193468
|
193469
|
193470
|
193471
|
193472
|
193473
|
193474
|
193475
|
193476
|
193477
|
193478
|
193479
|
193781
|
193782
|
193783
|
193784
|
193785
|
193786
|
193787
|
193788
|
193789
|
193790
|
193791
|
193792
|
193793
|
193794
|
193795
|
193796
|
193797
|
193798
|
193800
|
193801
|
193802
|
193803
|
193804
|
193805
|
193806
|
193807
|
193808
|
193809
|
193810
|
193811
|
193812
|
193813
|
193814
|
193815
|
193816
|
193817