View | Details | Raw Unified | Return to bug 37592
Collapse All | Expand All

(-)a/installer/data/mysql/db_revs/240600029.pl (-1 / +1 lines)
Lines 28-34 return { Link Here
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 DATETIME 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 ON UPDATE CURRENT_TIMESTAMP NOT NULL COMMENT 'the datetime for when a booking has been updated'
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'
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`");
(-)a/installer/data/mysql/kohastructure.sql (-3 / +2 lines)
Lines 1223-1230 CREATE TABLE `bookings` ( Link Here
1223
  `pickup_library_id` varchar(10) NOT NULL COMMENT 'Identifier for booking pickup library',
1223
  `pickup_library_id` varchar(10) NOT NULL COMMENT 'Identifier for booking pickup library',
1224
  `start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking',
1224
  `start_date` datetime DEFAULT NULL COMMENT 'the start date of the booking',
1225
  `end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking',
1225
  `end_date` datetime DEFAULT NULL COMMENT 'the end date of the booking',
1226
  `creation_date` timestamp DEFAULT current_timestamp() COMMENT 'the timestamp for when a booking was created',
1226
  `creation_date` timestamp DEFAULT current_timestamp() NOT NULL COMMENT 'the timestamp for when a booking was created',
1227
  `modification_date` timestamp DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'the timestamp for when a booking has been updated',
1227
  `modification_date` timestamp DEFAULT current_timestamp() NOT NULL ON UPDATE current_timestamp() COMMENT 'the timestamp for when a booking has been updated',
1228
  `status` enum('new', 'cancelled', 'completed') NOT NULL DEFAULT 'new' COMMENT 'current status of the booking',
1228
  `status` enum('new', 'cancelled', 'completed') NOT NULL DEFAULT 'new' COMMENT 'current status of the booking',
1229
  `cancellation_reason` varchar(80) DEFAULT NULL COMMENT 'optional authorised value BOOKING_CANCELLATION',
1229
  `cancellation_reason` varchar(80) DEFAULT NULL COMMENT 'optional authorised value BOOKING_CANCELLATION',
1230
  PRIMARY KEY (`booking_id`),
1230
  PRIMARY KEY (`booking_id`),
1231
- 

Return to bug 37592