diff --git a/htdocs/install/mysql/tables/llx_element_resources.key.sql b/htdocs/install/mysql/tables/llx_element_resources.key.sql new file mode 100644 index 00000000000..780a3cc1885 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_element_resources.key.sql @@ -0,0 +1,27 @@ +-- ============================================================================ +-- Copyright (C) 2008 Laurent Destailleur +-- Copyright (C) 2014 Jean-François Ferry +-- +-- 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 . +-- +-- ============================================================================ + + +ALTER TABLE llx_element_resources ADD UNIQUE INDEX idx_element_resources_idx1 (resource_id, resource_type, element_id, element_type); + + +ALTER TABLE llx_element_resources ADD INDEX idx_element_element_element_id (element_id); + +-- Pas de contraite sur resource_id et element_id car pointe sur differentes tables + \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_resource.key.sql b/htdocs/install/mysql/tables/llx_resource.key.sql new file mode 100755 index 00000000000..e15bc9b5559 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_resource.key.sql @@ -0,0 +1,19 @@ +-- Module to manage locations, buildings, floors and rooms into Dolibarr ERP/CRM +-- Copyright (C) 2013 Jean-François Ferry +-- +-- 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 . + + +ALTER TABLE llx_place ADD CONSTRAINT fk_place_fk_socpeople FOREIGN KEY (fk_socpeople) REFERENCES llx_socpeople (rowid); +ALTER TABLE llx_place ADD INDEX fk_socpeople_place (fk_socpeople); \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_resource.sql b/htdocs/install/mysql/tables/llx_resource.sql new file mode 100755 index 00000000000..fe8bdc62ee1 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_resource.sql @@ -0,0 +1,28 @@ +-- Module to manage reources into Dolibarr ERP/CRM +-- Copyright (C) 2013 Jean-François Ferry +-- +-- 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 . + +CREATE TABLE llx_resource +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer, + ref varchar(255), + description text, + lat float(10,6), + lng float(10,6), + note_public text, + note_private text, + tms timestamp +)ENGINE=innodb; \ No newline at end of file