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

Return to bug 16829