Bugzilla – Attachment 181909 Details for
Bug 39075
Fix DB inconsistencies in the usage statistics module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39075: Explicit NOT NULL for timestamp
Bug-39075-Explicit-NOT-NULL-for-timestamp.patch (text/plain), 3.45 KB, created by
Jonathan Druart
on 2025-05-05 12:01:27 UTC
(
hide
)
Description:
Bug 39075: Explicit NOT NULL for timestamp
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-05-05 12:01:27 UTC
Size:
3.45 KB
patch
obsolete
>From 8ca78c44202f95a941359a3fdcc7bb0c81ae75c5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 5 May 2025 12:40:34 +0200 >Subject: [PATCH] Bug 39075: Explicit NOT NULL for timestamp > >--- > installer/data/mysql/db_revs/241200015.pl | 4 ++-- > installer/data/mysql/kohastructure.sql | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/installer/data/mysql/db_revs/241200015.pl b/installer/data/mysql/db_revs/241200015.pl >index 9b2211803cd..75ba0efc00b 100755 >--- a/installer/data/mysql/db_revs/241200015.pl >+++ b/installer/data/mysql/db_revs/241200015.pl >@@ -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" ); >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 1daafbea0a2..c9b953ef43f 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -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`), >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 39075
:
177674
|
177727
|
177728
| 181909