From efbf214b5c6163ff7533967de1df83c3400e9018 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 25 Nov 2024 13:09:08 +0000 Subject: [PATCH] Bug 37592: (Follow-up) Fix timestamp vs datatime in db_rev --- 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 863f9bf2932..9fa86ba00b4 100644 --- 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 NOT NULL COMMENT 'the datetime for when a bookings was created' + ALTER TABLE bookings ADD COLUMN creation_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL 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 NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'the datetime for when a booking has been updated' + ALTER TABLE bookings ADD COLUMN modification_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT 'the datetime for when a booking has been updated' SQL if ( @{$existing_columns} == 0 ) { $dbh->do("$creation_date_statement AFTER `end_date`"); -- 2.47.0