From 0fab397495e7b084e7447186f27cd0efc4f931af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 May 2007 09:51:21 +0000 Subject: [PATCH] Ajout contrainte unique sur type adherent --- mysql/migration/2.1.0-2.2.0.sql | 4 ++++ mysql/tables/llx_adherent_type.sql | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mysql/migration/2.1.0-2.2.0.sql b/mysql/migration/2.1.0-2.2.0.sql index d4129e7607a..bf2e1ee8453 100644 --- a/mysql/migration/2.1.0-2.2.0.sql +++ b/mysql/migration/2.1.0-2.2.0.sql @@ -13,6 +13,10 @@ ALTER TABLE llx_cotisation ADD UNIQUE INDEX uk_cotisation (fk_adherent,dateadh); update llx_const set name='MAIN_ENABLE_DEVELOPMENT' where name='MAIN_SHOW_DEVELOPMENT_MODULES'; +delete from llx_adherent_type where libelle IS NULL; +alter table llx_adherent_type modify libelle varchar(50) NOT NULL; + + -- Extention de la gestion des catégories alter table llx_categorie ADD type int not null default '0'; diff --git a/mysql/tables/llx_adherent_type.sql b/mysql/tables/llx_adherent_type.sql index 0a3aaf1aecc..6581e56a001 100644 --- a/mysql/tables/llx_adherent_type.sql +++ b/mysql/tables/llx_adherent_type.sql @@ -30,7 +30,7 @@ create table llx_adherent_type rowid integer AUTO_INCREMENT PRIMARY KEY, tms timestamp, statut smallint NOT NULL DEFAULT 0, - libelle varchar(50), + libelle varchar(50) NOT NULL, cotisation enum('yes','no') NOT NULL DEFAULT 'yes', vote enum('yes','no') NOT NULL DEFAULT 'yes', note text,