diff --git a/mysql/migration/2.2.0-2.4.0.sql b/mysql/migration/2.2.0-2.4.0.sql index 60d2170a657..2a4dceee511 100644 --- a/mysql/migration/2.2.0-2.4.0.sql +++ b/mysql/migration/2.2.0-2.4.0.sql @@ -186,4 +186,6 @@ create table llx_events description text NOT NULL -- full description of action ) type=innodb; +ALTER TABLE llx_events ADD INDEX idx_events_dateevent (dateevent); + diff --git a/mysql/tables/llx_events.key.sql b/mysql/tables/llx_events.key.sql new file mode 100644 index 00000000000..923c2441987 --- /dev/null +++ b/mysql/tables/llx_events.key.sql @@ -0,0 +1,22 @@ +-- ============================================================================ +-- Copyright (C) 2008 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- =========================================================================== + + +ALTER TABLE llx_events ADD INDEX idx_events_dateevent (dateevent); diff --git a/mysql/tables/llx_events.sql b/mysql/tables/llx_events.sql new file mode 100644 index 00000000000..e6eaaf71dc8 --- /dev/null +++ b/mysql/tables/llx_events.sql @@ -0,0 +1,36 @@ +-- ======================================================================== +-- Copyright (C) 2008 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 2 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- ======================================================================== +-- This table logs all dolibarr events +-- Content of this table is not managed by users but by Dolibarr triggers. +-- ======================================================================== + +create table llx_events +( + id integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, -- date creation/modification + fk_action integer, -- action type + dateevent datetime, -- date event + label varchar(50) NOT NULL, -- label of action + description text NOT NULL -- full description of action +) type=innodb; + + + +