From e1fcaf738f74b84789c24743468d380de81df546 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 10 Sep 2012 10:55:06 +0200 Subject: [PATCH] Fix: move llx_ecm_documents in external module --- .../install/mysql/migration/3.2.0-3.3.0.sql | 25 +----------- .../mysql/tables/llx_ecm_documents.key.sql | 27 ------------- .../mysql/tables/llx_ecm_documents.sql | 40 ------------------- 3 files changed, 1 insertion(+), 91 deletions(-) delete mode 100644 htdocs/install/mysql/tables/llx_ecm_documents.key.sql delete mode 100644 htdocs/install/mysql/tables/llx_ecm_documents.sql diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index a3499ec2de7..34e06092833 100755 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -90,7 +90,6 @@ ALTER TABLE llx_accountingaccount ADD COLUMN active tinyint DEFAULT 1 NOT NULL ALTER TABLE llx_actioncomm MODIFY elementtype VARCHAR(32); --- TASK #107 ALTER TABLE llx_ecm_directories MODIFY COLUMN label varchar(64) NOT NULL; ALTER TABLE llx_ecm_directories ADD COLUMN fullpath text AFTER cachenbofdoc; ALTER TABLE llx_ecm_directories MODIFY COLUMN fullpath text; @@ -101,31 +100,10 @@ ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_m (fk_user ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_c FOREIGN KEY (fk_user_c) REFERENCES llx_user (rowid); ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_m FOREIGN KEY (fk_user_m) REFERENCES llx_user (rowid); -ALTER TABLE llx_ecm_documents DROP FOREIGN KEY fk_ecm_documents_fk_directory; -ALTER TABLE llx_ecm_documents DROP INDEX idx_ecm_documents_ref; -ALTER TABLE llx_ecm_documents DROP INDEX idx_ecm_documents; -ALTER TABLE llx_ecm_documents DROP COLUMN manualkeyword; -ALTER TABLE llx_ecm_documents DROP COLUMN fullpath_orig; -ALTER TABLE llx_ecm_documents DROP COLUMN private; -ALTER TABLE llx_ecm_documents DROP COLUMN crc; -ALTER TABLE llx_ecm_documents DROP COLUMN cryptkey; -ALTER TABLE llx_ecm_documents DROP COLUMN cipher; -ALTER TABLE llx_ecm_documents CHANGE COLUMN fullpath_dol fullpath text; -ALTER TABLE llx_ecm_documents MODIFY COLUMN ref varchar(32) NOT NULL; -ALTER TABLE llx_ecm_documents MODIFY COLUMN fullpath text; -ALTER TABLE llx_ecm_documents MODIFY COLUMN filemime varchar(128) NOT NULL; -ALTER TABLE llx_ecm_documents ADD COLUMN metadata text after description; -ALTER TABLE llx_ecm_documents ADD COLUMN extraparams varchar(255) AFTER fk_directory; -ALTER TABLE llx_ecm_documents ADD UNIQUE INDEX idx_ecm_documents_ref (ref, entity); -ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_create (fk_create); -ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_update (fk_update); -ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_create FOREIGN KEY (fk_create) REFERENCES llx_user (rowid); -ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_update FOREIGN KEY (fk_update) REFERENCES llx_user (rowid); - create table llx_element_tag ( rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer DEFAULT 1 NOT NULL, -- multi company id + entity integer DEFAULT 1 NOT NULL, lang varchar(5) NOT NULL, tag varchar(255) NOT NULL, fk_element integer NOT NULL, @@ -134,7 +112,6 @@ create table llx_element_tag )ENGINE=innodb; ALTER TABLE llx_element_tag ADD UNIQUE INDEX uk_element_tag (entity, lang, tag, fk_element, element); --- END TASK #107 CREATE TABLE llx_holiday_config diff --git a/htdocs/install/mysql/tables/llx_ecm_documents.key.sql b/htdocs/install/mysql/tables/llx_ecm_documents.key.sql deleted file mode 100644 index 0f7616d8a59..00000000000 --- a/htdocs/install/mysql/tables/llx_ecm_documents.key.sql +++ /dev/null @@ -1,27 +0,0 @@ --- ============================================================================ --- Copyright (C) 2010 Laurent Destailleur --- Copyright (C) 2012 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 . --- --- ============================================================================ - - -ALTER TABLE llx_ecm_documents ADD UNIQUE INDEX idx_ecm_documents_ref (ref, entity); -ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_create (fk_create); -ALTER TABLE llx_ecm_documents ADD INDEX idx_ecm_documents_fk_update (fk_update); - -ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_create FOREIGN KEY (fk_create) REFERENCES llx_user (rowid); -ALTER TABLE llx_ecm_documents ADD CONSTRAINT fk_ecm_documents_fk_update FOREIGN KEY (fk_update) REFERENCES llx_user (rowid); - \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_ecm_documents.sql b/htdocs/install/mysql/tables/llx_ecm_documents.sql deleted file mode 100644 index 148fec437f2..00000000000 --- a/htdocs/install/mysql/tables/llx_ecm_documents.sql +++ /dev/null @@ -1,40 +0,0 @@ --- =================================================================== --- Copyright (C) 2008-2012 Laurent Destailleur --- Copyright (C) 2009-2012 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 . --- --- =================================================================== - - -create table llx_ecm_documents -( - rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer DEFAULT 1 NOT NULL, - ref varchar(32) NOT NULL, -- hash(fullpath + filename + version) - filename varchar(255) NOT NULL, - filesize integer NOT NULL, - filemime varchar(128) NOT NULL, - description text, - metadata text, -- Secure file information (json format / encrypted) - fullpath text, - fk_directory integer, - extraparams varchar(255), -- Other parameters (json format) - fk_create integer NOT NULL, - fk_update integer, - date_c datetime NOT NULL, - date_u timestamp, - fk_status smallint DEFAULT 0 - -) ENGINE=innodb;