From 34b3becef2c38804153f062f4043b47fb23143a4 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 6 May 2024 09:35:59 -0300 Subject: [PATCH] Bug 25159: (QA follow-up) Make DBRev idempotent Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer --- installer/data/mysql/db_revs/231200043.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/installer/data/mysql/db_revs/231200043.pl b/installer/data/mysql/db_revs/231200043.pl index 944f2e3041..315b9975c9 100755 --- a/installer/data/mysql/db_revs/231200043.pl +++ b/installer/data/mysql/db_revs/231200043.pl @@ -7,7 +7,10 @@ return { my ($args) = @_; my ( $dbh, $out ) = @$args{qw(dbh out)}; - $dbh->do(q{ALTER TABLE action_logs ADD COLUMN diff LONGTEXT NULL DEFAULT NULL AFTER trace;}); + unless ( column_exists( 'action_logs', 'diff' ) ) { + $dbh->do(q{ALTER TABLE action_logs ADD COLUMN diff LONGTEXT NULL DEFAULT NULL AFTER trace;}); + } + say $out "Added column 'action_logs.diff'"; }, }; -- 2.39.5