llx_inventory-stock.sql 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. -- ===================================================================
  2. -- Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
  3. -- Copyright (C) 2017 ATM Consulting <support@atm-consulting.fr>
  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. CREATE TABLE llx_inventory
  20. (
  21. rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY,
  22. entity integer DEFAULT 0,
  23. ref varchar(48), -- We will also use this code as inventory code
  24. date_creation datetime DEFAULT NULL,
  25. tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  26. fk_user_creat integer, -- user making creation
  27. fk_user_modif integer, -- user making last change
  28. fk_user_valid integer, -- valideur de la fiche
  29. fk_warehouse integer DEFAULT NULL,
  30. fk_product integer DEFAULT NULL,
  31. categories_product varchar(255) DEFAULT NULL, -- product categories id separated by comma
  32. status integer DEFAULT 0,
  33. title varchar(255) NOT NULL,
  34. date_inventory datetime DEFAULT NULL,
  35. date_validation datetime DEFAULT NULL,
  36. import_key varchar(14) -- import key
  37. )
  38. ENGINE=innodb;