Lines 25-34
return {
Link Here
|
25 |
} |
25 |
} |
26 |
|
26 |
|
27 |
my $creation_date_statement = <<~'SQL'; |
27 |
my $creation_date_statement = <<~'SQL'; |
28 |
ALTER TABLE bookings ADD COLUMN creation_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT 'the datetime for when a bookings was created' |
28 |
ALTER TABLE bookings ADD COLUMN creation_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT 'the datetime for when a bookings was created' |
29 |
SQL |
29 |
SQL |
30 |
my $modification_date_statement = <<~'SQL'; |
30 |
my $modification_date_statement = <<~'SQL'; |
31 |
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' |
31 |
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' |
32 |
SQL |
32 |
SQL |
33 |
if ( @{$existing_columns} == 0 ) { |
33 |
if ( @{$existing_columns} == 0 ) { |
34 |
$dbh->do("$creation_date_statement AFTER `end_date`"); |
34 |
$dbh->do("$creation_date_statement AFTER `end_date`"); |
35 |
- |
|
|