Bugzilla – Attachment 147225 Details for
Bug 33051
22600075.pl is not idempotent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33051: Make 22600075.pl idempotent
Bug-33051-Make-22600075pl-idempotent.patch (text/plain), 1.48 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-02-23 11:00:14 UTC
(
hide
)
Description:
Bug 33051: Make 22600075.pl idempotent
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-02-23 11:00:14 UTC
Size:
1.48 KB
patch
obsolete
>From ff4395b5da23bdca3a02ed15b54871061c8c6774 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 23 Feb 2023 07:56:31 -0300 >Subject: [PATCH] Bug 33051: Make 22600075.pl idempotent > >As there is no check, this dbrev could cause trouble if run twice. It >doesn't look like it is going to get backported to 22.05, but just in >case... > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > installer/data/mysql/db_revs/220600075.pl | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/db_revs/220600075.pl b/installer/data/mysql/db_revs/220600075.pl >index df2dbb255cc..279284a8dd9 100755 >--- a/installer/data/mysql/db_revs/220600075.pl >+++ b/installer/data/mysql/db_revs/220600075.pl >@@ -1,12 +1,17 @@ > use Modern::Perl; > > return { >- bug_number => "31948", >+ bug_number => "31948", > description => "Add timestamp to tmp_holdsqueue table", > up => sub { > my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; > >- $dbh->do(q{ALTER TABLE `tmp_holdsqueue` ADD `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER item_level_request}); >+ unless ( column_exists( 'tmp_holdsqueue', 'timestamp' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE `tmp_holdsqueue` >+ ADD `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP AFTER item_level_request >+ }); >+ } > }, > }; >-- >2.34.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 33051
:
147225
|
147229