From: Tomas Cohen Arazi Date: Fri, 1 Jul 2016 20:48:37 +0000 (-0300) Subject: Bug 16829: Add 'interface' column to action_logs X-Git-Tag: v16.11.00~958 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;ds=sidebyside;h=8a135fd21a06045075b49b465082dae74086f53f;p=koha-ffzg.git Bug 16829: Add 'interface' column to action_logs This patch introduces a new column for the action_logs table. It is called 'interface' and it is intended to store the interface in which the action was performed. Sponsored-by: NEKLS Signed-off-by: Nicole C Engard Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- diff --git a/installer/data/mysql/atomicupdate/bug_16829_action_logs_interface.sql b/installer/data/mysql/atomicupdate/bug_16829_action_logs_interface.sql new file mode 100644 index 0000000000..9591824d0b --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_16829_action_logs_interface.sql @@ -0,0 +1,14 @@ +ALTER TABLE `action_logs` ADD COLUMN `interface` VARCHAR(30) DEFAULT NULL AFTER `info`; +ALTER TABLE `action_logs` ADD KEY `interface` (`interface`); + +-- $DBversion = "16.06.00.XXX"; +-- if ( CheckVersion($DBversion) ) { +-- $dbh->do(q{ +-- ALTER TABLE `action_logs` ADD COLUMN `interface` VARCHAR(30) DEFAULT NULL AFTER `info`; +-- }); +-- $dbh->do({ +-- ALTER TABLE `action_logs` ADD KEY `interface` (`interface`); +-- }); +-- print "Upgrade to $DBversion done (Bug 16829: action_logs should have an 'interface' column)\n"; +-- SetVersion($DBversion); +-- } diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 76aa46201c..a05ef0684a 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2715,13 +2715,15 @@ CREATE TABLE `action_logs` ( -- logs of actions taken in Koha (requires that the `action` text, -- the action (includes things like DELETED, ADDED, MODIFY, etc) `object` int(11) default NULL, -- the object that the action was taken against (could be a borrowernumber, itemnumber, etc) `info` text, -- information about the action (usually includes SQL statement) + `interface` VARCHAR(30) DEFAULT NULL, -- the context this action was taken in PRIMARY KEY (`action_id`), KEY `timestamp_idx` (`timestamp`), KEY `user_idx` (`user`), KEY `module_idx` (`module`(255)), KEY `action_idx` (`action`(255)), KEY `object_idx` (`object`), - KEY `info_idx` (`info`(255)) + KEY `info_idx` (`info`(255)), + KEY `interface` (`interface`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; --