Fix: supprimait les autres modèles si on leur avait donné le même 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_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; alter table llx_document_model add column type varchar(20) NOT NULL after nom;
update llx_document_model set type='propal' where type=''; update llx_document_model set type='propal' where type='';

View File

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