Add database tables for resource module

This commit is contained in:
Jean-François Ferry 2014-03-15 16:57:03 +01:00 committed by jfefe
parent 9e542397ef
commit 6c75a0cb11
3 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,27 @@
-- ============================================================================
-- Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2014 Jean-François Ferry <jfefe@aternatik.fr>
--
-- 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/>.
--
-- ============================================================================
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

View File

@ -0,0 +1,19 @@
-- Module to manage locations, buildings, floors and rooms into Dolibarr ERP/CRM
-- Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr>
--
-- 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/>.
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);

View File

@ -0,0 +1,28 @@
-- Module to manage reources into Dolibarr ERP/CRM
-- Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr>
--
-- 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_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;