Start Task 172

This commit is contained in:
Florian Henry 2013-10-31 01:21:09 +01:00
parent 693918d8b6
commit 70bbe10f9e
3 changed files with 66 additions and 0 deletions

View File

@ -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);

View File

@ -0,0 +1,25 @@
-- ============================================================================
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
--
-- 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_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

View File

@ -0,0 +1,30 @@
-- ============================================================================
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
--
-- 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/>.
--
-- ============================================================================
-- 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;