Bugzilla – Attachment 160577 Details for
Bug 35717
Link suggestions to orders by adding ordernumber to suggestions table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35717: DBIC schema changes
Bug-35717-DBIC-schema-changes.patch (text/plain), 3.17 KB, created by
Nick Clemens (kidclamp)
on 2024-01-05 18:57:03 UTC
(
hide
)
Description:
Bug 35717: DBIC schema changes
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-01-05 18:57:03 UTC
Size:
3.17 KB
patch
obsolete
>From 22e3f86ebcf4e3171f8ba0c3400e75a41eca8f56 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 5 Jan 2024 14:27:33 +0000 >Subject: [PATCH] Bug 35717: DBIC schema changes > >--- > Koha/Schema/Result/Aqorder.pm | 19 ++++++++++++++++-- > Koha/Schema/Result/Suggestion.pm | 34 ++++++++++++++++++++++++++++++-- > 2 files changed, 49 insertions(+), 4 deletions(-) > >diff --git a/Koha/Schema/Result/Aqorder.pm b/Koha/Schema/Result/Aqorder.pm >index 075cdba39ab..6d14ee2334d 100644 >--- a/Koha/Schema/Result/Aqorder.pm >+++ b/Koha/Schema/Result/Aqorder.pm >@@ -803,6 +803,21 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 suggestions >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Suggestion> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "suggestions", >+ "Koha::Schema::Result::Suggestion", >+ { "foreign.ordernumber" => "self.ordernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 borrowernumbers > > Type: many_to_many >@@ -814,8 +829,8 @@ Composing rels: L</aqorder_users> -> borrowernumber > __PACKAGE__->many_to_many("borrowernumbers", "aqorder_users", "borrowernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2023-09-06 17:56:52 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aaj6mc1M13YFx5P0aXMiEQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-01-05 14:22:44 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ym0QsLhqY/xj2BuzZ9Idpg > > __PACKAGE__->belongs_to( > "basket", >diff --git a/Koha/Schema/Result/Suggestion.pm b/Koha/Schema/Result/Suggestion.pm >index ff65a54d955..dc9a69420f1 100644 >--- a/Koha/Schema/Result/Suggestion.pm >+++ b/Koha/Schema/Result/Suggestion.pm >@@ -219,6 +219,14 @@ isbn of the suggested item > > foreign key linking the suggestion to the biblio table after the suggestion has been ordered > >+=head2 ordernumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 1 >+ >+foreign key linking the suggestion to the acquisitions order after the suggestion has been ordered >+ > =head2 reason > > data_type: 'mediumtext' >@@ -360,6 +368,8 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_nullable => 1, size => 30 }, > "biblionumber", > { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, >+ "ordernumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "reason", > { data_type => "mediumtext", is_nullable => 1 }, > "patronreason", >@@ -516,6 +526,26 @@ __PACKAGE__->belongs_to( > }, > ); > >+=head2 ordernumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Aqorder> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "ordernumber", >+ "Koha::Schema::Result::Aqorder", >+ { ordernumber => "ordernumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "CASCADE", >+ }, >+); >+ > =head2 rejectedby > > Type: belongs_to >@@ -557,8 +587,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-09-07 20:40:07 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NSX5a0b7SJyhLVT8Fx4jaQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2024-01-05 14:22:45 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:r/e9P7F0v11ITvFT1qQztQ > > __PACKAGE__->belongs_to( > "suggester", >-- >2.30.2
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 35717
:
160576
|
160577
|
160578
|
160579
|
160580
|
160581
|
160582
|
160583
|
164834
|
164835
|
164836
|
164837
|
164838
|
164839
|
164840
|
172871
|
172872
|
172873
|
172874
|
172875
|
172876
|
172877
|
172878
|
172899
|
172900
|
172901