Bug 37592: (follow-up) Fix timestamp vs datetime in db_rev

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2024-11-25 13:09:08 +00:00 committed by Katrin Fischer
parent 16d01084c1
commit aceccc7e51
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 2 additions and 2 deletions

View File

@ -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`");