Bugzilla – Attachment 155532 Details for
Bug 29390
Authorised values: Add a few missing foreign keys
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29390: Rename atomicupdate file
Bug-29390-Rename-atomicupdate-file.patch (text/plain), 1.83 KB, created by
David Nind
on 2023-09-12 05:19:20 UTC
(
hide
)
Description:
Bug 29390: Rename atomicupdate file
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-09-12 05:19:20 UTC
Size:
1.83 KB
patch
obsolete
>From 13d7c966d2185d0d8cf6e6a59e7a4a50cb2eebfb Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 26 Jun 2023 12:15:49 +0000 >Subject: [PATCH] Bug 29390: Rename atomicupdate file > >Renamed bug number too. >Added a count since an existing FK or an error may impact the count >(not to mention running the dbrev multiple times). >Remove Dumper. > >Test plan: >If running it previously worked, run it again and see 0 added. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: David Nind <david@davidnind.com> >--- > .../data/mysql/atomicupdate/{bug_29336_2.pl => bug29390.pl} | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > rename installer/data/mysql/atomicupdate/{bug_29336_2.pl => bug29390.pl} (95%) > >diff --git a/installer/data/mysql/atomicupdate/bug_29336_2.pl b/installer/data/mysql/atomicupdate/bug29390.pl >similarity index 95% >rename from installer/data/mysql/atomicupdate/bug_29336_2.pl >rename to installer/data/mysql/atomicupdate/bug29390.pl >index cf97b304cb..863c6d9154 100755 >--- a/installer/data/mysql/atomicupdate/bug_29336_2.pl >+++ b/installer/data/mysql/atomicupdate/bug29390.pl >@@ -1,8 +1,7 @@ > use Modern::Perl; >-use Data::Dumper; > > return { >- bug_number => 29336, >+ bug_number => 29390, > description => "Add missing FK constraints to authorised value categories", > up => sub { > my ($args) = @_; >@@ -18,6 +17,7 @@ return { > ); > > my $sql; >+ my $cnt = 0; > foreach my $table ( sort keys %fix_tables ) { > my $field = $fix_tables{$table}; > next if foreign_key_exists( $table, undef, $field ); >@@ -53,6 +53,8 @@ return { > ON DELETE CASCADE ON UPDATE CASCADE > |; > $dbh->do($sql); >+ $cnt++; > } >+ say $out "Added $cnt foreign key constraints."; > }, > } >-- >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 29390
:
127214
|
127215
|
128985
|
152730
|
152731
|
152732
|
152733
|
152734
|
155529
|
155530
|
155531
| 155532 |
155533