Bug 24329: Prevent update of timestamp on action_logs updates

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2020-01-02 13:03:07 +00:00 committed by Joy Nelson
parent 4ac096c1a5
commit cff5d11731
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,8 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do( "ALTER TABLE action_logs MODIFY COLUMN `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP" );
# Always end with this (adjust the bug info)
SetVersion( $DBversion );
print "Upgrade to $DBversion done (Bug 24329 - Do not update action_log.timestamp)\n";
}

View File

@ -2749,7 +2749,7 @@ CREATE TABLE `account_offsets` (
DROP TABLE IF EXISTS `action_logs`;
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
`action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time the action took place
`timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the action took place
`user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
`module` MEDIUMTEXT, -- the module this action was taken against
`action` MEDIUMTEXT, -- the action (includes things like DELETED, ADDED, MODIFY, etc)