Files
dolibarr/mysql/migration/2.0.0-2.1.0.sql
2006-03-01 15:26:54 +00:00

83 lines
2.4 KiB
SQL

-- $Revision$
--
-- Attention à l ordre des requetes
-- ce fichier doit être chargé sur une version 2.0.0
-- sans AUCUNE erreur ni warning
--
create table llx_commande_model_pdf
(
nom varchar(50) PRIMARY KEY,
libelle varchar(255),
description text
)type=innodb;
alter table llx_commande add column note_public text after note;
alter table llx_contrat add column note text;
alter table llx_contrat add column note_public text after note;
alter table llx_facture add column note_public text after note;
alter table llx_propal add column note_public text after note;
ALTER TABLE llx_societe ADD mode_reglement INT( 11 ) DEFAULT NULL ;
ALTER TABLE llx_societe ADD cond_reglement INT( 11 ) DEFAULT '1' NOT NULL ;
ALTER TABLE llx_societe ADD tva_assuj tinyint;
ALTER TABLE llx_societe MODIFY tva_assuj tinyint;
alter table llx_product add gencode varchar(255) DEFAULT NULL;
insert into llx_cond_reglement(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PROFORMA', 6,1, 'Proforma','Réglement avant livraison',0,0);
alter table llx_commande add fk_cond_reglement int(11) DEFAULT NULL;
alter table llx_commande add fk_mode_reglement int(11) DEFAULT NULL;
create table llx_comfourn_facfourn
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_commande integer NOT NULL,
fk_facture integer NOT NULL,
key(fk_commande),
key(fk_facture)
)type=innodb;
create table llx_commande_fournisseur_model_pdf
(
nom varchar(50) PRIMARY KEY,
libelle varchar(255),
description text
)type=innodb;
alter table llx_categorie add fk_statut smallint DEFAULT 0;
alter table llx_actioncomm modify datea datetime;
alter table llx_actioncomm add column datec datetime after id;
alter table llx_actioncomm add column datep datetime after datec;
alter table llx_actioncomm add column tms timestamp after datea;
create table llx_expedition_model_pdf
(
nom varchar(50) PRIMARY KEY,
libelle varchar(255),
description text
)type=innodb;
create table llx_product_det
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
fk_product integer DEFAULT 0 NOT NULL,
lang varchar(5) DEFAULT 0 NOT NULL,
label varchar(128),
description varchar(255),
note text
)type=innodb;
ALTER TABLE `llx_propal` ADD `date_livraison` DATE;
ALTER TABLE `llx_commande` ADD `date_livraison` DATE;