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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 2524-2530 CREATE TABLE `accountoffsets` ( Link Here
2524
DROP TABLE IF EXISTS `action_logs`;
2524
DROP TABLE IF EXISTS `action_logs`;
2525
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2525
CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the logs be turned on)
2526
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2526
  `action_id` int(11) NOT NULL auto_increment, -- unique identifier for each action
2527
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- the date and time the action took place
2527
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- the date and time the action took place
2528
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2528
  `user` int(11) NOT NULL default 0, -- the staff member who performed the action (borrowers.borrowernumber)
2529
  `module` text, -- the module this action was taken against
2529
  `module` text, -- the module this action was taken against
2530
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
2530
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
(-)a/installer/data/mysql/updatedatabase.pl (-2 / +3 lines)
Lines 6659-6665 $DBversion = "3.11.00.XXX"; Link Here
6659
if ( CheckVersion($DBversion) ) {
6659
if ( CheckVersion($DBversion) ) {
6660
    $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;");
6660
    $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;");
6661
    $dbh->do("UPDATE action_logs SET info=(SELECT itemnumber FROM items WHERE biblionumber= action_logs.info LIMIT 1) WHERE module='CIRCULATION' AND action in ('ISSUE','RETURN');");
6661
    $dbh->do("UPDATE action_logs SET info=(SELECT itemnumber FROM items WHERE biblionumber= action_logs.info LIMIT 1) WHERE module='CIRCULATION' AND action in ('ISSUE','RETURN');");
6662
    print "Upgrade to $DBversion done (Bug 7241: Changing timestamp autoupdate on action_logs; setting items to circulation logs where missing)\n";
6662
    $dbh->do("ALTER TABLE action_logs CHANGE timestamp timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;");
6663
    print "Upgrade to $DBversion done (Bug 7241: Fix on circulation logs)\n";
6664
    print "WARNING about bug 7241: to partially correct the broken logs, the log history is filled with the first found item for each biblio.\n";
6663
    SetVersion($DBversion);
6665
    SetVersion($DBversion);
6664
}
6666
}
6665
6667
6666
- 

Return to bug 7241