From ac26061d25f4ee4b8242aab0b0e96499fb5f9993 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 8 Aug 2011 22:27:00 +0000 Subject: [PATCH] Fix: move advanced extrafields in external module --- .../install/mysql/migration/3.0.0-3.1.0.sql | 8 +---- .../tables/llx_advanced_extrafields.key.sql | 21 ----------- .../mysql/tables/llx_advanced_extrafields.sql | 36 ------------------- .../llx_advanced_extrafields_options.key.sql | 23 ------------ .../llx_advanced_extrafields_options.sql | 29 --------------- .../llx_advanced_extrafields_values.key.sql | 23 ------------ .../llx_advanced_extrafields_values.sql | 35 ------------------ 7 files changed, 1 insertion(+), 174 deletions(-) delete mode 100755 htdocs/install/mysql/tables/llx_advanced_extrafields.key.sql delete mode 100755 htdocs/install/mysql/tables/llx_advanced_extrafields.sql delete mode 100755 htdocs/install/mysql/tables/llx_advanced_extrafields_options.key.sql delete mode 100755 htdocs/install/mysql/tables/llx_advanced_extrafields_options.sql delete mode 100755 htdocs/install/mysql/tables/llx_advanced_extrafields_values.key.sql delete mode 100755 htdocs/install/mysql/tables/llx_advanced_extrafields_values.sql diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql index 3e4a44db5a9..aab279b907e 100755 --- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql +++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql @@ -1,5 +1,5 @@ -- --- $Id: 3.0.0-3.1.0.sql,v 1.87 2011/08/08 16:13:28 hregis Exp $ +-- $Id: 3.0.0-3.1.0.sql,v 1.88 2011/08/08 22:27:01 hregis Exp $ -- -- Be carefull to requests order. -- This file must be loaded by calling /install/index.php page @@ -482,9 +482,3 @@ ALTER TABLE llx_don ADD phone_mobile varchar(24) after email; ALTER TABLE llx_don ADD phone varchar(24) after email; ALTER TABLE llx_user ADD civilite varchar(6) after entity; - -ALTER TABLE llx_advanced_extrafields_options DROP COLUMN tms; -ALTER TABLE llx_advanced_extrafields_options CHANGE COLUMN rang pos integer; -ALTER TABLE llx_advanced_extrafields CHANGE COLUMN rang pos integer; -ALTER TABLE llx_advanced_extrafields CHANGE COLUMN format type varchar(8) NOT NULL; -ALTER TABLE llx_advanced_extrafields CHANGE COLUMN fieldsize size integer; diff --git a/htdocs/install/mysql/tables/llx_advanced_extrafields.key.sql b/htdocs/install/mysql/tables/llx_advanced_extrafields.key.sql deleted file mode 100755 index 18eed730ab8..00000000000 --- a/htdocs/install/mysql/tables/llx_advanced_extrafields.key.sql +++ /dev/null @@ -1,21 +0,0 @@ --- ============================================================================ --- Copyright (C) 2010 Regis Houssin --- --- 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 2 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 . --- --- $Id: llx_advanced_extrafields.key.sql,v 1.3 2011/08/03 01:25:31 eldy Exp $ --- ============================================================================ - - -ALTER TABLE llx_advanced_extrafields ADD UNIQUE INDEX idx_advanced_extrafields_name (elementtype, entity, name); diff --git a/htdocs/install/mysql/tables/llx_advanced_extrafields.sql b/htdocs/install/mysql/tables/llx_advanced_extrafields.sql deleted file mode 100755 index 7dbf6b92416..00000000000 --- a/htdocs/install/mysql/tables/llx_advanced_extrafields.sql +++ /dev/null @@ -1,36 +0,0 @@ --- =================================================================== --- Copyright (C) 2010-2011 Regis Houssin --- --- 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 2 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 . --- --- $Id: llx_advanced_extrafields.sql,v 1.4 2011/08/08 16:13:29 hregis Exp $ --- =================================================================== - -create table llx_advanced_extrafields -( - rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, - entity integer DEFAULT 1 NOT NULL, -- multi company id - - elementtype varchar(64) NOT NULL, -- type of link 'invoice', 'order', 'proposal', 'invoice_supplier', 'order_supplier' - name varchar(64) NOT NULL, -- code name of field - label varchar(64) NOT NULL, - type varchar(8) NOT NULL, -- date, string, integer, float - size integer, - maxlength integer, - options varchar(255), - - pos integer - -)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_advanced_extrafields_options.key.sql b/htdocs/install/mysql/tables/llx_advanced_extrafields_options.key.sql deleted file mode 100755 index 62a88236480..00000000000 --- a/htdocs/install/mysql/tables/llx_advanced_extrafields_options.key.sql +++ /dev/null @@ -1,23 +0,0 @@ --- ============================================================================ --- Copyright (C) 2010 Regis Houssin --- --- 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 2 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 . --- --- $Id: llx_advanced_extrafields_options.key.sql,v 1.2 2011/08/03 01:25:31 eldy Exp $ --- ============================================================================ - - -ALTER TABLE llx_advanced_extrafields_options ADD INDEX idx_advanced_extrafields_options_fk_advanced_extrafields (fk_extrafields); - -ALTER TABLE llx_advanced_extrafields_options ADD CONSTRAINT fk_advanced_extrafields_options_fk_advanced_extrafields FOREIGN KEY (fk_extrafields) REFERENCES llx_advanced_extrafields (rowid); diff --git a/htdocs/install/mysql/tables/llx_advanced_extrafields_options.sql b/htdocs/install/mysql/tables/llx_advanced_extrafields_options.sql deleted file mode 100755 index 83e830286e3..00000000000 --- a/htdocs/install/mysql/tables/llx_advanced_extrafields_options.sql +++ /dev/null @@ -1,29 +0,0 @@ --- =================================================================== --- Copyright (C) 2010-2011 Regis Houssin --- --- 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 2 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 . --- --- $Id: llx_advanced_extrafields_options.sql,v 1.3 2011/08/08 16:07:33 hregis Exp $ --- =================================================================== - -create table llx_advanced_extrafields_options -( - rowid integer AUTO_INCREMENT PRIMARY KEY, - - fk_extrafields integer NOT NULL, - value varchar(255) NOT NULL, - - pos integer - -)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_advanced_extrafields_values.key.sql b/htdocs/install/mysql/tables/llx_advanced_extrafields_values.key.sql deleted file mode 100755 index 296b49fc93f..00000000000 --- a/htdocs/install/mysql/tables/llx_advanced_extrafields_values.key.sql +++ /dev/null @@ -1,23 +0,0 @@ --- ============================================================================ --- Copyright (C) 2010 Regis Houssin --- --- 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 2 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 . --- --- $Id: llx_advanced_extrafields_values.key.sql,v 1.2 2011/08/03 01:25:26 eldy Exp $ --- ============================================================================ - - -ALTER TABLE llx_advanced_extrafields_values ADD INDEX idx_advanced_extrafields_values_fk_advanced_extrafields (fk_extrafields, entity); - -ALTER TABLE llx_advanced_extrafields_values ADD CONSTRAINT fk_advanced_extrafields_values_fk_advanced_extrafields FOREIGN KEY (fk_extrafields) REFERENCES llx_advanced_extrafields (rowid); diff --git a/htdocs/install/mysql/tables/llx_advanced_extrafields_values.sql b/htdocs/install/mysql/tables/llx_advanced_extrafields_values.sql deleted file mode 100755 index 9cedf70e7ca..00000000000 --- a/htdocs/install/mysql/tables/llx_advanced_extrafields_values.sql +++ /dev/null @@ -1,35 +0,0 @@ --- =================================================================== --- Copyright (C) 2010 Regis Houssin --- --- 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 2 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 . --- --- $Id: llx_advanced_extrafields_values.sql,v 1.2 2011/08/03 01:25:39 eldy Exp $ --- =================================================================== - -create table llx_advanced_extrafields_values -( - rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, - entity integer DEFAULT 1 NOT NULL, -- multi company id - - datec datetime, - datem datetime, - fk_element integer NOT NULL, -- id of object (rowid of proposal, order, invoice...) - fk_extrafields integer NOT NULL, -- key to attribute definition - value varchar(255), -- value of attribute - - fk_user_create integer, - fk_user_modif integer - -)ENGINE=innodb;