Fix: supprimait les autres modles si on leur avait donn le mme nom

Fix: ajout du champ "rowid" qui devient cl primaire  la place du champ "nom"
This commit is contained in:
Regis Houssin 2006-06-09 09:41:32 +00:00
parent caac021d2e
commit 3eeb6c769b
2 changed files with 5 additions and 2 deletions

View File

@ -194,6 +194,8 @@ update llx_const set value='azur' where value='orange' and name = 'PROPALE_ADDON
alter table llx_propal_model_pdf rename to llx_document_model;
alter table llx_document_model DROP PRIMARY KEY;
alter table llx_document_model add column rowid integer AUTO_INCREMENT PRIMARY KEY FIRST;
alter table llx_document_model add column type varchar(20) NOT NULL after nom;
update llx_document_model set type='propal' where type='';

View File

@ -25,8 +25,9 @@
create table llx_document_model
(
nom varchar(50) PRIMARY KEY,
type varchar(12) NOT NULL,
rowid integer AUTO_INCREMENT PRIMARY KEY,
nom varchar(50),
type varchar(12) NOT NULL,
libelle varchar(255),
description text
)type=innodb;