From 9bcb924afcc97221bb73c59e74d6b63ce69e083e Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Mon, 16 Sep 2024 12:51:38 +0000 Subject: [PATCH] Bug 37592: (follow-up) Fix database update statements Signed-off-by: Katrin Fischer --- installer/data/mysql/db_revs/240600029.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/db_revs/240600029.pl b/installer/data/mysql/db_revs/240600029.pl index 59350818a8..0c95f4f425 100755 --- a/installer/data/mysql/db_revs/240600029.pl +++ b/installer/data/mysql/db_revs/240600029.pl @@ -25,10 +25,10 @@ return { } my $creation_date_statement = <<~'SQL'; - ALTER TABLE bookings ADD COLUMN creation_date DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT 'The datetime for when a bookings was created' AFTER end_date + ALTER TABLE bookings ADD COLUMN creation_date DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT 'The datetime for when a bookings was created' SQL my $modification_date_statement = <<~'SQL'; - ALTER TABLE bookings ADD COLUMN modification_date DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'The datetime for when a booking has been updated' AFTER modification_date + ALTER TABLE bookings ADD COLUMN modification_date DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'The datetime for when a booking has been updated' SQL if ( @{$existing_columns} == 0 ) { if ( $dbh->do("$creation_date_statement AFTER `end_date`") ) { -- 2.39.5