From 0aa1904a3665c54b1e19ecd8db2509fcaa515121 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Jan 2007 22:10:23 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20contrainte=20int=E9grit=E9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mysql/migration/2.0.0-2.1.0.sql | 2 ++ mysql/tables/llx_document_model.key.sql | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 mysql/tables/llx_document_model.key.sql diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql index d1c609083a5..dbd1e37139a 100644 --- a/mysql/migration/2.0.0-2.1.0.sql +++ b/mysql/migration/2.0.0-2.1.0.sql @@ -631,3 +631,5 @@ create table llx_bordereau_cheque alter table llx_product_price add price_level tinyint(4) NULL DEFAULT 1; alter table llx_product_price add column price_ttc float(12,4) DEFAULT 0 after price; alter table llx_product_price add column price_base_type varchar(3) DEFAULT 'HT' after price_ttc; + +ALTER TABLE llx_document_model ADD UNIQUE uk_document_model (nom,type); diff --git a/mysql/tables/llx_document_model.key.sql b/mysql/tables/llx_document_model.key.sql new file mode 100644 index 00000000000..bc7216c5434 --- /dev/null +++ b/mysql/tables/llx_document_model.key.sql @@ -0,0 +1,24 @@ +-- =================================================================== +-- Copyright (C) 2007 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$ +-- $Source$ +-- +-- =================================================================== + + +ALTER TABLE llx_document_model ADD UNIQUE uk_document_model (nom,type);