-- Copyright (C) 2019      Laurent Destailleur  <eldy@users.sourceforge.net>
--
-- 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 3 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, see http://www.gnu.org/licenses/.


CREATE TABLE `llx_projet_aditional_desc` (
  `rowid` int(11) NOT NULL AUTO_INCREMENT,
  `fk_projet` int(11) NOT NULL,
  `description` text DEFAULT NULL,
  `datec` datetime DEFAULT NULL,
  `fk_user_creat` int(11) NOT NULL,
  `fk_user_modif` int(11) DEFAULT NULL,
  `tms` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `llx_work_flows` (
  `rowid` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL,
  `related` varchar(100) NOT NULL,
  `status` int(1) NOT NULL,
  `modified_by` int(11) NOT NULL,
  `modified_date` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

INSERT INTO `llx_work_flows` VALUES (1, 'Verificación de solicitud de $', 'HR', 1, 0, '');

CREATE TABLE `llx_work_flows_steps` (
  `rowid` int(11) NOT NULL AUTO_INCREMENT,
  `work_flow` int(11) NOT NULL,
  `step` int(11) NOT NULL,
  `step_users` text NOT NULL,
  PRIMARY KEY (`rowid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;

INSERT INTO `llx_work_flows_steps` VALUES (1, 1, 2, '');
INSERT INTO `llx_work_flows_steps` VALUES (2, 1, 3, '');
INSERT INTO `llx_work_flows_steps` VALUES (3, 1, 4, '');
INSERT INTO `llx_work_flows_steps` VALUES (4, 1, 1, '');