From 1222d9a1d90002cdbcc47ec4c0ddbb4fd666ae4d Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Fri, 28 Apr 2006 22:54:02 +0000
Subject: [PATCH] =?UTF-8?q?Uniformisation=20du=20code:=20Tous=20les=20modu?=
 =?UTF-8?q?les=20de=20g=E9n=E9ration=20de=20document=20PDF=20s'active=20da?=
 =?UTF-8?q?ns=20la=20table=20llx=5Fdocument=5Fmodel=20plutot=20que=20les?=
 =?UTF-8?q?=20n=20tables=20llx=5Fxxxx=5Fmodel=5Fpdf.=20Cela=20r=E9duit=20l?=
 =?UTF-8?q?e=20nombres=20de=20tables=20et=20permet=20plus=20de=20mutualisa?=
 =?UTF-8?q?tion=20du=20code.=20Ainsi,=20tous=20les=20modules=20peuvent=20a?=
 =?UTF-8?q?voir=20maintenant=20plusieurs=20mod=E8le=20actifs,=20et=201=20m?=
 =?UTF-8?q?od=E8le=20d=E9faut.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 mysql/migration/2.0.0-2.1.0.sql | 36 ++++++++++++++-------------------
 1 file changed, 15 insertions(+), 21 deletions(-)

diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql
index aa31c809fe0..245ffca2e92 100644
--- a/mysql/migration/2.0.0-2.1.0.sql
+++ b/mysql/migration/2.0.0-2.1.0.sql
@@ -6,15 +6,7 @@
 -- 
 
 
-create table llx_commande_model_pdf
-(
-  nom         varchar(50) PRIMARY KEY,
-  libelle     varchar(255),
-  description text
-)type=innodb;
-
-insert into llx_commande_model_pdf(nom) values('azur');
-
+drop table llx_commande_model_pdf if exist;
 
 alter table llx_commande add column note_public text after note;
 
@@ -70,12 +62,8 @@ update llx_actioncomm set datec = datea where datec is null;
 update llx_actioncomm set datep = datea where datep is null;
 
 
-create table llx_expedition_model_pdf
-(
-  nom         varchar(50) PRIMARY KEY,
-  libelle     varchar(255),
-  description text
-)type=innodb;
+drop table llx_expedition_model_pdf if exists;
+
 
 create table llx_product_det
 (
@@ -107,12 +95,7 @@ ALTER TABLE llx_commande_fournisseur ADD CONSTRAINT fk_commande_fournisseur_soci
 alter table llx_commande_fournisseur add note_public text after note;
 
 
-create table llx_avoir_model_pdf
-(
-  nom         varchar(50) PRIMARY KEY,
-  libelle     varchar(255),
-  description text
-)type=innodb;
+drop table if exists llx_avoir_model_pdf;
 
 
 drop table if exists llx_soc_recontact;
@@ -164,3 +147,14 @@ insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,no
 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (291, 5,  '10','0','VAT Rate 10',1);
 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (292, 5,   '0','0','VAT Rate 0',1);
 
+
+alter table llx_propal_model_pdf rename to llx_document_model;
+alter table llx_document_model add column type varchar(20) NOT NULL after nom;
+update llx_document_model set type='propal' where type='';
+
+insert into llx_document_model(nom,type) values('einstein','order');
+insert into llx_document_model(nom,type) values('soleil','ficheinter');
+insert into llx_document_model(nom,type) values('rouget','shipping');
+delete from llx_document_model where nom='adytek';
+delete from llx_document_model where nom='rouge' and type='order';
+delete from llx_document_model where nom='azur' and type='order';
-- 
GitLab