Bugzilla – Attachment 123493 Details for
Bug 22690
Merging records with many items too slow (Elasticsearch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22690: DBIC Schema Updates
Bug-22690-DBIC-Schema-Updates.patch (text/plain), 6.48 KB, created by
Martin Renvoize (ashimema)
on 2021-08-05 13:29:21 UTC
(
hide
)
Description:
Bug 22690: DBIC Schema Updates
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-08-05 13:29:21 UTC
Size:
6.48 KB
patch
obsolete
>From 67aeb80535910035789b775db65ed9e6bc58da8e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 22 Jul 2021 10:55:04 +0100 >Subject: [PATCH] Bug 22690: DBIC Schema Updates > >--- > Koha/Schema/Result/Biblio.pm | 19 +++++++- > Koha/Schema/Result/Borrower.pm | 19 +++++++- > Koha/Schema/Result/Item.pm | 19 +++++++- > Koha/Schema/Result/Linktracker.pm | 75 ++++++++++++++++++++++++++++--- > 4 files changed, 121 insertions(+), 11 deletions(-) > >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index dd14f2d807..3e0db5499a 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -330,6 +330,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 linktrackers >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Linktracker> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "linktrackers", >+ "Koha::Schema::Result::Linktracker", >+ { "foreign.biblionumber" => "self.biblionumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 old_reserves > > Type: has_many >@@ -496,8 +511,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-02-03 10:03:26 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YVZN5K/K1v7Kj2yYGwT2CQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-07-22 09:54:44 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FjffUcBiOmDhB5Wod9urpg > > __PACKAGE__->has_many( > "biblioitem", >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 68abbc11aa..29d7eaf170 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1349,6 +1349,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 linktrackers >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Linktracker> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "linktrackers", >+ "Koha::Schema::Result::Linktracker", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 message_queues > > Type: has_many >@@ -1875,8 +1890,8 @@ Composing rels: L</aqorder_users> -> ordernumber > __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-07-12 13:40:00 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IKPb4912o8oCHtmFAi6FPQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-07-22 09:54:44 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gjSiLeCD1Xe3+SmyGgDq9g > > __PACKAGE__->add_columns( > '+anonymized' => { is_boolean => 1 }, >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index 864095bcf6..c377ac8a9b 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -744,6 +744,21 @@ __PACKAGE__->might_have( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 linktrackers >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::Linktracker> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "linktrackers", >+ "Koha::Schema::Result::Linktracker", >+ { "foreign.itemnumber" => "self.itemnumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 old_issues > > Type: has_many >@@ -850,8 +865,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U5Tm2JfUnfhACRDJ4SpFgQ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-07-22 09:54:44 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T8g2topYVrbdqhw5UsCmDA > > __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); > >diff --git a/Koha/Schema/Result/Linktracker.pm b/Koha/Schema/Result/Linktracker.pm >index 7a4e495583..2108d8210f 100644 >--- a/Koha/Schema/Result/Linktracker.pm >+++ b/Koha/Schema/Result/Linktracker.pm >@@ -34,6 +34,7 @@ primary key identifier > =head2 biblionumber > > data_type: 'integer' >+ is_foreign_key: 1 > is_nullable: 1 > > biblionumber of the record the link is from >@@ -41,6 +42,7 @@ biblionumber of the record the link is from > =head2 itemnumber > > data_type: 'integer' >+ is_foreign_key: 1 > is_nullable: 1 > > itemnumber if applicable that the link was from >@@ -48,6 +50,7 @@ itemnumber if applicable that the link was from > =head2 borrowernumber > > data_type: 'integer' >+ is_foreign_key: 1 > is_nullable: 1 > > borrowernumber who clicked the link >@@ -73,11 +76,11 @@ __PACKAGE__->add_columns( > "id", > { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, > "biblionumber", >- { data_type => "integer", is_nullable => 1 }, >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "itemnumber", >- { data_type => "integer", is_nullable => 1 }, >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "borrowernumber", >- { data_type => "integer", is_nullable => 1 }, >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, > "url", > { data_type => "mediumtext", is_nullable => 1 }, > "timeclicked", >@@ -100,9 +103,71 @@ __PACKAGE__->add_columns( > > __PACKAGE__->set_primary_key("id"); > >+=head1 RELATIONS > >-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dNzvrDz4qAO/rvZaYUEjAg >+=head2 biblionumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Biblio> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "biblionumber", >+ "Koha::Schema::Result::Biblio", >+ { biblionumber => "biblionumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "SET NULL", >+ }, >+); >+ >+=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, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "SET NULL", >+ }, >+); >+ >+=head2 itemnumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Item> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "itemnumber", >+ "Koha::Schema::Result::Item", >+ { itemnumber => "itemnumber" }, >+ { >+ is_deferrable => 1, >+ join_type => "LEFT", >+ on_delete => "SET NULL", >+ on_update => "SET NULL", >+ }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-07-22 09:54:44 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/OpO+hgnOTsMMXApkRsT4A > > > # You can replace this text with custom content, and it will be preserved on regeneration >-- >2.20.1
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 22690
:
90061
|
90115
|
90116
|
92828
|
94505
|
97696
|
98143
|
98210
|
98211
|
99376
|
99379
|
100316
|
104796
|
104797
|
104871
|
105445
|
106144
|
108777
|
109694
|
110991
|
110994
|
111196
|
111207
|
111236
|
111237
|
112100
|
112184
|
112567
|
112569
|
112754
|
113308
|
113309
|
113941
|
113942
|
113967
|
113968
|
118226
|
118227
|
118229
|
118231
|
118391
|
119433
|
119434
|
120820
|
120821
|
120852
|
120853
|
121389
|
121392
|
121474
|
121516
|
121517
|
121518
|
121519
|
121520
|
122846
|
122847
|
122848
|
122849
|
122850
|
122886
|
122887
|
122888
|
122889
|
122890
|
122936
|
122938
|
122939
|
123029
|
123030
|
123031
|
123032
|
123033
|
123034
|
123035
|
123036
|
123037
|
123038
|
123039
|
123040
|
123041
|
123042
|
123044
|
123062
|
123481
|
123482
|
123483
|
123484
|
123485
|
123486
|
123487
|
123488
|
123489
|
123490
|
123491
|
123492
| 123493 |
123494
|
123495
|
123496
|
123497
|
124176
|
124188
|
124257