From a7024e66ea2d4ebd2fe6ae805fc0c2826243401f Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 27 May 2011 16:18:10 +0000 Subject: [PATCH] Fix: missing table --- .../install/mysql/migration/3.0.0-3.1.0.sql | 5 +++- .../mysql/tables/llx_c_availability.key.sql | 22 ++++++++++++++ .../mysql/tables/llx_c_input_reason.key.sql | 22 ++++++++++++++ .../mysql/tables/llx_c_input_reason.sql | 30 +++++++++++++++++++ 4 files changed, 78 insertions(+), 1 deletion(-) create mode 100755 htdocs/install/mysql/tables/llx_c_availability.key.sql create mode 100755 htdocs/install/mysql/tables/llx_c_input_reason.key.sql create mode 100755 htdocs/install/mysql/tables/llx_c_input_reason.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 0e909015a03..d089caed0e4 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 @@ -75,9 +75,10 @@ CREATE TABLE llx_c_availability code varchar(30) NOT NULL, label varchar(60) NOT NULL, active tinyint DEFAULT 1 NOT NULL - )ENGINE=innodb; +ALTER TABLE llx_c_availability ADD UNIQUE INDEX uk_c_availability(code); + -- Use table name input_reason to match also input_method DROP table llx_c_demand_reason; CREATE TABLE llx_c_input_reason @@ -88,6 +89,8 @@ CREATE TABLE llx_c_input_reason active tinyint DEFAULT 1 NOT NULL )ENGINE=innodb; +ALTER TABLE llx_c_input_reason ADD UNIQUE INDEX uk_c_input_reason(code); + INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (1, 'SRC_INTE', 'Web site', 1); INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (2, 'SRC_CAMP_MAIL', 'Mailing campaign', 1); INSERT INTO llx_c_input_reason (rowid,code,label,active) VALUES (3, 'SRC_CAMP_PHO', 'Phone campaign', 1); diff --git a/htdocs/install/mysql/tables/llx_c_availability.key.sql b/htdocs/install/mysql/tables/llx_c_availability.key.sql new file mode 100755 index 00000000000..7b5fa661d7d --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_availability.key.sql @@ -0,0 +1,22 @@ +-- ======================================================================== +-- Copyright (C) 2004-2005 Rodolphe Quiedeville +-- Copyright (C) 2005-2009 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 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, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- ======================================================================== + +ALTER TABLE llx_c_availability ADD UNIQUE INDEX uk_c_availability(code); diff --git a/htdocs/install/mysql/tables/llx_c_input_reason.key.sql b/htdocs/install/mysql/tables/llx_c_input_reason.key.sql new file mode 100755 index 00000000000..e1cab3b3368 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_input_reason.key.sql @@ -0,0 +1,22 @@ +-- ======================================================================== +-- Copyright (C) 2004-2005 Rodolphe Quiedeville +-- Copyright (C) 2005-2009 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 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, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- ======================================================================== + +ALTER TABLE llx_c_input_reason ADD UNIQUE INDEX uk_c_input_reason(code); diff --git a/htdocs/install/mysql/tables/llx_c_input_reason.sql b/htdocs/install/mysql/tables/llx_c_input_reason.sql new file mode 100755 index 00000000000..88327949106 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_input_reason.sql @@ -0,0 +1,30 @@ +-- ======================================================================== +-- Copyright (C) 2004-2005 Rodolphe Quiedeville +-- Copyright (C) 2005-2009 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 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, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +-- +-- $Id$ +-- ======================================================================== + +create table llx_c_input_reason +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(30), + label varchar(60), + active tinyint default 1 NOT NULL + +)ENGINE=innodb; +