llx_events.sql 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. -- ========================================================================
  2. -- Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
  3. -- Copyright (C) 2009 Regis Houssin <regis.houssin@inodbox.com>
  4. --
  5. -- This program is free software; you can redistribute it and/or modify
  6. -- it under the terms of the GNU General Public License as published by
  7. -- the Free Software Foundation; either version 3 of the License, or
  8. -- (at your option) any later version.
  9. --
  10. -- This program is distributed in the hope that it will be useful,
  11. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. -- GNU General Public License for more details.
  14. --
  15. -- You should have received a copy of the GNU General Public License
  16. -- along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. --
  18. -- ========================================================================
  19. -- This table logs all dolibarr security events
  20. -- Content of this table is not managed by users but by Dolibarr
  21. -- trigger interface_20_all_Logevents.
  22. -- ========================================================================
  23. create table llx_events
  24. (
  25. rowid integer AUTO_INCREMENT PRIMARY KEY,
  26. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date
  27. type varchar(32) NOT NULL, -- action type
  28. entity integer DEFAULT 1 NOT NULL, -- multi company id
  29. prefix_session varchar(255) NULL, -- prefix of session, obtained with dol_getprefix
  30. dateevent datetime, -- date event
  31. fk_user integer, -- id user
  32. description varchar(250) NOT NULL, -- full description of action
  33. ip varchar(250) NOT NULL, -- ip (must contains ip v4 and v6 or dns names)
  34. user_agent varchar(255) NULL, -- user agent
  35. fk_object integer NULL, -- id of related object
  36. authentication_method varchar(64) NULL, -- type of authentication mode used if internal login event
  37. fk_oauth_token integer NULL -- id in oauth_token if internal login event done using an oauth_token
  38. ) ENGINE=innodb;