Bug 39075: Explicit NOT NULL for timestamp
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
0a94b02139
commit
01f842f4a7
|
|
@ -12,7 +12,7 @@ return {
|
|||
if ( column_exists( 'erm_counter_files', 'date_uploaded' ) ) {
|
||||
$dbh->do(
|
||||
q{
|
||||
ALTER TABLE erm_counter_files CHANGE COLUMN date_uploaded date_uploaded timestamp DEFAULT current_timestamp() COMMENT 'counter file upload date'
|
||||
ALTER TABLE erm_counter_files CHANGE COLUMN date_uploaded date_uploaded timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'counter file upload date'
|
||||
}
|
||||
);
|
||||
say_success(
|
||||
|
|
@ -26,7 +26,7 @@ return {
|
|||
if ( column_exists( 'erm_counter_logs', 'importdate' ) ) {
|
||||
$dbh->do(
|
||||
q{
|
||||
ALTER TABLE erm_counter_logs CHANGE COLUMN importdate importdate timestamp DEFAULT current_timestamp() COMMENT 'counter file import date'
|
||||
ALTER TABLE erm_counter_logs CHANGE COLUMN importdate importdate timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'counter file import date'
|
||||
}
|
||||
);
|
||||
say_success( $out, "Successfully corrected incorrect default value for 'erm_counter_logs.importdate" );
|
||||
|
|
|
|||
|
|
@ -3042,7 +3042,7 @@ CREATE TABLE `erm_counter_files` (
|
|||
`type` varchar(80) DEFAULT NULL COMMENT 'type of counter file',
|
||||
`filename` varchar(80) DEFAULT NULL COMMENT 'name of the counter file',
|
||||
`file_content` longblob DEFAULT NULL COMMENT 'content of the counter file',
|
||||
`date_uploaded` timestamp NULL DEFAULT current_timestamp() COMMENT 'counter file upload date',
|
||||
`date_uploaded` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'counter file upload date',
|
||||
PRIMARY KEY (`erm_counter_files_id`),
|
||||
KEY `erm_counter_files_ibfk_1` (`usage_data_provider_id`),
|
||||
CONSTRAINT `erm_counter_files_ibfk_1` FOREIGN KEY (`usage_data_provider_id`) REFERENCES `erm_usage_data_providers` (`erm_usage_data_provider_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
|
|
@ -3061,7 +3061,7 @@ CREATE TABLE `erm_counter_logs` (
|
|||
`borrowernumber` int(11) DEFAULT NULL COMMENT 'foreign key to borrowers',
|
||||
`counter_files_id` int(11) DEFAULT NULL COMMENT 'foreign key to erm_counter_files',
|
||||
`usage_data_provider_id` int(11) DEFAULT NULL COMMENT 'foreign key to erm_usage_data_providers',
|
||||
`importdate` timestamp NULL DEFAULT current_timestamp() COMMENT 'counter file import date',
|
||||
`importdate` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'counter file import date',
|
||||
`filename` varchar(80) DEFAULT NULL COMMENT 'name of the counter file',
|
||||
`logdetails` longtext DEFAULT NULL COMMENT 'details from the counter log',
|
||||
PRIMARY KEY (`erm_counter_log_id`),
|
||||
|
|
|
|||
Loading…
Reference in New Issue