Bugzilla – Attachment 153013 Details for
Bug 31383
Additional contents: We need a parent and child table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31383: Fix dbrevs
Bug-31383-Fix-dbrevs.patch (text/plain), 1.39 KB, created by
Jonathan Druart
on 2023-07-04 11:58:57 UTC
(
hide
)
Description:
Bug 31383: Fix dbrevs
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-07-04 11:58:57 UTC
Size:
1.39 KB
patch
obsolete
>From 9d792b0c716d4b96a7951552ecd97947ad990d1c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 4 Jul 2023 13:58:34 +0200 >Subject: [PATCH] Bug 31383: Fix dbrevs > >We need to remove duplicate entries. >--- > installer/data/mysql/atomicupdate/bug_31383.pl | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/installer/data/mysql/atomicupdate/bug_31383.pl b/installer/data/mysql/atomicupdate/bug_31383.pl >index 3a3d7584f5d..0b825813250 100755 >--- a/installer/data/mysql/atomicupdate/bug_31383.pl >+++ b/installer/data/mysql/atomicupdate/bug_31383.pl >@@ -44,6 +44,14 @@ return { > for my $translated_content ( @$translated_contents ) { > $sth_insert->execute($content->{id}, $translated_content->{title}, $translated_content->{content}, $translated_content->{lang}, $translated_content->{updated_on}); > } >+ >+ # Delete duplicates >+ $q = q{ >+ DELETE FROM additional_contents >+ WHERE category=? AND code=? AND id<>? AND >+ }; >+ $q .= defined $content->{branchcode} ? " branchcode = ?" : " branchcode IS NULL"; >+ $dbh->do($q, undef, $content->{category}, $content->{code}, $content->{id}, $content->{branchcode}); > } > $dbh->do(q{ > ALTER TABLE additional_contents >-- >2.25.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 31383
:
147891
|
147892
|
147893
|
147894
|
147895
|
147896
|
149813
|
149814
|
149815
|
149816
|
149817
|
149818
|
152423
|
152424
|
152425
|
152426
|
152427
|
152428
|
152545
|
152546
|
152547
|
152566
|
152660
|
152661
|
152662
|
152663
|
152664
|
152665
|
152666
|
152667
|
152668
|
152669
|
153013
|
153666
|
153667
|
153668
|
153669
|
153670
|
153671
|
153672
|
153673
|
153674
|
153675
|
153676
|
156048
|
156049
|
156050
|
156051
|
156052
|
156053
|
156054
|
156055
|
156056
|
156057
|
156058
|
156265
|
156266
|
156267
|
156268
|
156269
|
156270
|
156271
|
156272
|
156273
|
156274
|
156275
|
156276
|
157539
|
157540
|
157541
|
157542
|
157543
|
157544
|
157545
|
157546
|
157547
|
157548
|
157549
|
157550
|
157580
|
157585
|
157640
|
157741
|
157742