1-- =========================================================================== 2-- Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3-- Copyright (C) 2010 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 20create table llx_projet 21( 22 rowid integer AUTO_INCREMENT PRIMARY KEY, 23 fk_soc integer, 24 datec datetime, -- date creation project 25 tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, 26 dateo date, -- date start project 27 datee date, -- date end project 28 ref varchar(50), 29 entity integer DEFAULT 1 NOT NULL, -- multi company id 30 title varchar(255) NOT NULL, 31 description text, 32 fk_user_creat integer NOT NULL, -- createur du projet 33 fk_user_modif integer, 34 public integer, -- project is public or not 35 fk_statut integer DEFAULT 0 NOT NULL, -- open or close 36 fk_opp_status integer DEFAULT NULL, -- if project is used to manage opportunities 37 opp_percent double(5,2), 38 fk_opp_status_end integer DEFAULT NULL, -- if project is used to manage opportunities (the opportunity status the project has when set to lose) 39 date_close datetime DEFAULT NULL, 40 fk_user_close integer DEFAULT NULL, 41 note_private text, 42 note_public text, 43 email_msgid varchar(175), -- if project or lead is created by email collector, we store here MSG ID. Do not use a too large value, it generates trouble with unique index 44 --budget_days real, -- budget in days is sum of field planned_workload of tasks 45 opp_amount double(24,8), 46 budget_amount double(24,8), 47 usage_opportunity integer DEFAULT 0, -- Set to 1 if project is used to follow an opportunity 48 usage_task integer DEFAULT 1, -- Set to 1 if project is used to manage tasks and/or record timesheet 49 usage_bill_time integer DEFAULT 0, -- Set to 1 if time spent must be converted into invoices 50 usage_organize_event integer DEFAULT 0, -- Set to 1 if you want to use project to organize an event, receive attendees subscription 51 accept_conference_suggestions integer DEFAULT 0, -- Set to 1 if you want to allow unknown people to suggest conferences 52 accept_booth_suggestions integer DEFAULT 0, -- Set to 1 if you want to Allow unknown people to suggest booth 53 price_registration double(24,8), 54 price_booth double(24,8), 55 model_pdf varchar(255), 56 last_main_doc varchar(255), -- relative filepath+filename of last main generated document 57 import_key varchar(14) -- Import key 58)ENGINE=innodb; 59