From 3bac7c9e1173349b15a19b27697549790bf91837 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 12 Oct 2014 16:31:56 +0200 Subject: [PATCH] Add index on new table llx_c_email_template --- .../install/mysql/migration/3.6.0-3.7.0.sql | 4 ++++ .../mysql/tables/llx_c_email_template.key.sql | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 htdocs/install/mysql/tables/llx_c_email_template.key.sql diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 9f4291cd05f..8ba2fa4ec1b 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -18,6 +18,7 @@ -- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user); -- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup); + ALTER TABLE llx_bank_account ADD COLUMN fk_user_author integer; ALTER TABLE llx_c_actioncomm ADD COLUMN color varchar(9); @@ -1086,3 +1087,6 @@ CREATE TABLE llx_usergroup_extrafields ( ALTER TABLE llx_usergroup_extrafields ADD INDEX idx_usergroup_extrafields (fk_object); ALTER TABLE llx_contrat ADD COLUMN model_pdf varchar(255) DEFAULT NULL AFTER note_public; + +ALTER TABLE llx_c_email_template ADD UNIQUE INDEX uk_c_email_template(label, lang); +ALTER TABLE llx_c_email_template ADD INDEX idx_type(type_template); diff --git a/htdocs/install/mysql/tables/llx_c_email_template.key.sql b/htdocs/install/mysql/tables/llx_c_email_template.key.sql new file mode 100644 index 00000000000..3543d7448d1 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_email_template.key.sql @@ -0,0 +1,22 @@ +-- =================================================================== +-- Copyright (C) 2014 Laurent Destailleur +-- +-- 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 with templates of emails +-- =================================================================== + +ALTER TABLE llx_c_email_template ADD UNIQUE INDEX uk_c_email_template(label, lang); +ALTER TABLE llx_c_email_template ADD INDEX idx_type(type_template); +