From 70bbe10f9edba0ab101128dfbe87d30caad7fbee Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Thu, 31 Oct 2013 01:21:09 +0100 Subject: [PATCH] Start Task 172 --- .../install/mysql/migration/3.4.0-3.5.0.sql | 11 +++++++ .../tables/llx_actioncomm_resources.key.sql | 25 ++++++++++++++++ .../mysql/tables/llx_actioncomm_resources.sql | 30 +++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql create mode 100644 htdocs/install/mysql/tables/llx_actioncomm_resources.sql diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index 396954347a6..e417a408d50 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -318,3 +318,14 @@ ALTER TABLE llx_societe ADD outstanding_limit double(24,8) DEFAULT NULL AFTER mo UPDATE llx_const SET name='COMPANY_DONOTSEARCH_ANYWHERE' WHERE name='SOCIETE_DONOTSEARCH_ANYWHERE'; +--Task 172 +create table llx_actioncomm_resources +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_actioncomm integer NOT NULL, + element_type varchar(50) NOT NULL, + fk_element integer NOT NULL, + fk_element_status varchar(32) NULL +) ENGINE=innodb; +ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element); +ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element); diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql new file mode 100644 index 00000000000..6d6999e7232 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql @@ -0,0 +1,25 @@ +-- ============================================================================ +-- Copyright (C) 2013 Laurent Destailleur +-- Copyright (C) 2013 Florian Henry +-- +-- 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_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element); +ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element); + +-- Pas de contraite sur fk_source et fk_target car pointe sur differentes tables + diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql new file mode 100644 index 00000000000..781744e7c60 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql @@ -0,0 +1,30 @@ +-- ============================================================================ +-- Copyright (C) 2013 Laurent Destailleur +-- Copyright (C) 2013 Florian Henry +-- +-- 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 . +-- +-- ============================================================================ +-- Table used for relations between elements of different types: +-- invoice-propal, propal-order, etc... +-- ============================================================================ + +create table llx_actioncomm_resources +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_actioncomm integer NOT NULL, + element_type varchar(50) NOT NULL, + fk_element integer NOT NULL, + fk_element_status varchar(32) NULL +) ENGINE=innodb;