Bug 37592: DBRev 24.06.00.029

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Katrin Fischer 2024-09-16 11:17:49 +00:00
parent e75c1ac012
commit d17c640510
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
2 changed files with 3 additions and 3 deletions

View file

@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "24.06.00.028";
$VERSION = "24.06.00.029";
sub version {
return $VERSION;

View file

@ -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'
ALTER TABLE bookings ADD COLUMN creation_date DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT 'The datetime for when a bookings was created' AFTER end_date
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'
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
SQL
if ( @{$existing_columns} == 0 ) {
if ( $dbh->do("$creation_date_statement AFTER `end_date`") ) {