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 2712-2724 CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the Link Here
2712
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
2712
  `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc)
2713
  `object` int(11) default NULL, -- the object that the action was taken against (could be a borrowernumber, itemnumber, etc)
2713
  `object` int(11) default NULL, -- the object that the action was taken against (could be a borrowernumber, itemnumber, etc)
2714
  `info` text, -- information about the action (usually includes SQL statement)
2714
  `info` text, -- information about the action (usually includes SQL statement)
2715
  `interface` VARCHAR(30) DEFAULT NULL, -- the context this action was taken in
2715
  PRIMARY KEY (`action_id`),
2716
  PRIMARY KEY (`action_id`),
2716
  KEY `timestamp_idx` (`timestamp`),
2717
  KEY `timestamp_idx` (`timestamp`),
2717
  KEY `user_idx` (`user`),
2718
  KEY `user_idx` (`user`),
2718
  KEY `module_idx` (`module`(255)),
2719
  KEY `module_idx` (`module`(255)),
2719
  KEY `action_idx` (`action`(255)),
2720
  KEY `action_idx` (`action`(255)),
2720
  KEY `object_idx` (`object`),
2721
  KEY `object_idx` (`object`),
2721
  KEY `info_idx` (`info`(255))
2722
  KEY `info_idx` (`info`(255)),
2723
  KEY `interface` (`interface`)
2722
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2724
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
2723
2725
2724
--
2726
--
2725
- 

Return to bug 16829