Bugzilla – Attachment 186477 Details for
Bug 40817
Holds charges should be accessible from Holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40817: Schema updates
Bug-40817-Schema-updates.patch (text/plain), 5.10 KB, created by
Martin Renvoize (ashimema)
on 2025-09-16 12:57:38 UTC
(
hide
)
Description:
Bug 40817: Schema updates
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-09-16 12:57:38 UTC
Size:
5.10 KB
patch
obsolete
>From c548d4824a4283c1d89e0037b476be0fc9d415d4 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Tue, 16 Sep 2025 13:46:29 +0100 >Subject: [PATCH] Bug 40817: Schema updates > >--- > Koha/Schema/Result/Accountline.pm | 60 +++++++++++++++++++++++++++++-- > Koha/Schema/Result/OldReserve.pm | 26 ++++++++++++-- > Koha/Schema/Result/Reserve.pm | 26 ++++++++++++-- > 3 files changed, 106 insertions(+), 6 deletions(-) > >diff --git a/Koha/Schema/Result/Accountline.pm b/Koha/Schema/Result/Accountline.pm >index ea1a8b7bd34..246decbfa22 100644 >--- a/Koha/Schema/Result/Accountline.pm >+++ b/Koha/Schema/Result/Accountline.pm >@@ -41,6 +41,18 @@ __PACKAGE__->table("accountlines"); > is_foreign_key: 1 > is_nullable: 1 > >+=head2 reserve_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+=head2 old_reserve_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ > =head2 borrowernumber > > data_type: 'integer' >@@ -160,6 +172,10 @@ __PACKAGE__->add_columns( > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "old_issue_id", > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "reserve_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "old_reserve_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "borrowernumber", > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "itemnumber", >@@ -424,6 +440,26 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 old_reserve >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::OldReserve> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "old_reserve", >+ "Koha::Schema::Result::OldReserve", >+ { reserve_id => "old_reserve_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ > =head2 register > > Type: belongs_to >@@ -444,9 +480,29 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 reserve >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Reserve> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "reserve", >+ "Koha::Schema::Result::Reserve", >+ { reserve_id => "reserve_id" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-02-08 14:18:03 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aVLdvK1lek01lZ0mbaCwZQ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-09-16 10:19:22 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JGNBdISXLLAdEXI25nrzaQ > > =head2 patron > >diff --git a/Koha/Schema/Result/OldReserve.pm b/Koha/Schema/Result/OldReserve.pm >index 028386206dc..e3bd4e62183 100644 >--- a/Koha/Schema/Result/OldReserve.pm >+++ b/Koha/Schema/Result/OldReserve.pm >@@ -332,6 +332,21 @@ __PACKAGE__->set_primary_key("reserve_id"); > > =head1 RELATIONS > >+=head2 accountlines >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Accountline> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "accountlines", >+ "Koha::Schema::Result::Accountline", >+ { "foreign.old_reserve_id" => "self.reserve_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 biblionumber > > Type: belongs_to >@@ -473,8 +488,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-09-03 17:08:22 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bo/exwlpahEVYtkWjusWLw >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-09-16 10:19:22 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RLh8fPWOVtWzG3VGOXyz6Q > > __PACKAGE__->belongs_to( > "item", >@@ -551,4 +566,11 @@ sub koha_objects_class { > 'Koha::Old::Holds'; > } > >+__PACKAGE__->has_many( >+ "accountlines", >+ "Koha::Schema::Result::Accountline", >+ { "foreign.old_reserve_id" => "self.reserve_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > 1; >diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm >index 3e65b00f67c..2651ed9dd91 100644 >--- a/Koha/Schema/Result/Reserve.pm >+++ b/Koha/Schema/Result/Reserve.pm >@@ -340,6 +340,21 @@ __PACKAGE__->set_primary_key("reserve_id"); > > =head1 RELATIONS > >+=head2 accountlines >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Accountline> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "accountlines", >+ "Koha::Schema::Result::Accountline", >+ { "foreign.reserve_id" => "self.reserve_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 biblionumber > > Type: belongs_to >@@ -501,8 +516,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-09-03 17:08:22 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:57Fw53HngTXhDU7kVEjqYw >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-09-16 10:19:22 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oG8jkV5GEf2y6jUCosAHkw > > __PACKAGE__->belongs_to( > "item", >@@ -588,4 +603,11 @@ __PACKAGE__->belongs_to( > { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, > ); > >+__PACKAGE__->has_many( >+ "accountlines", >+ "Koha::Schema::Result::Accountline", >+ { "foreign.reserve_id" => "self.reserve_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > 1; >-- >2.51.0
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 40817
:
186476
| 186477 |
186478
|
186479
|
186480
|
186481