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

(-)a/installer/data/mysql/atomicupdate/bug_16829_action_logs_interface.sql (+14 lines)
Line 0 Link Here
1
ALTER TABLE `action_logs` ADD COLUMN `interface` VARCHAR(30) DEFAULT NULL AFTER `info`;
2
ALTER TABLE `action_logs` ADD KEY `interface` (`interface`);
3
4
-- $DBversion = "16.06.00.XXX";
5
-- if ( CheckVersion($DBversion) ) {
6
--     $dbh->do(q{
7
--         ALTER TABLE `action_logs` ADD COLUMN `interface` VARCHAR(30) DEFAULT NULL AFTER `info`;
8
--     });
9
--     $dbh->do({
10
--         ALTER TABLE `action_logs` ADD KEY `interface` (`interface`);
11
--     });
12
--     print "Upgrade to $DBversion done (Bug 16829: action_logs should have an 'interface' column)\n";
13
--     SetVersion($DBversion);
14
-- }
(-)a/installer/data/mysql/kohastructure.sql (-2 / +3 lines)
Lines 2701-2713 CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the Link Here
2701
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
2701
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
2702
  `object` int(11) default NULL, -- the object that the action was taken against (could be a borrowernumber, itemnumber, etc)
2702
  `object` int(11) default NULL, -- the object that the action was taken against (could be a borrowernumber, itemnumber, etc)
2703
  `info` text, -- information about the action (usually includes SQL statement)
2703
  `info` text, -- information about the action (usually includes SQL statement)
2704
  `interface` VARCHAR(30) DEFAULT NULL, -- the context this action was taken in
2704
  PRIMARY KEY (`action_id`),
2705
  PRIMARY KEY (`action_id`),
2705
  KEY `timestamp_idx` (`timestamp`),
2706
  KEY `timestamp_idx` (`timestamp`),
2706
  KEY `user_idx` (`user`),
2707
  KEY `user_idx` (`user`),
2707
  KEY `module_idx` (`module`(255)),
2708
  KEY `module_idx` (`module`(255)),
2708
  KEY `action_idx` (`action`(255)),
2709
  KEY `action_idx` (`action`(255)),
2709
  KEY `object_idx` (`object`),
2710
  KEY `object_idx` (`object`),
2710
  KEY `info_idx` (`info`(255))
2711
  KEY `info_idx` (`info`(255)),
2712
  KEY `interface` (`interface`)
2711
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2713
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2712
2714
2713
--
2715
--
2714
- 

Return to bug 16829