2
0
forked from Wavyzz/dolibarr

mise jour des tables Postgresql avec le script de migration

This commit is contained in:
Regis Houssin
2007-08-18 07:36:55 +00:00
parent daf5b3afbf
commit eaee5f5640
170 changed files with 5905 additions and 4483 deletions

View File

@@ -27,21 +27,32 @@
-- --
-- ======================================================================== -- ========================================================================
create table llx_actioncomm create table llx_actioncomm
( (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
"datec" timestamp, -- date creation "datec" timestamp, -- date creation
"datep" timestamp, -- date 0% "datep" timestamp, -- date debut planifiee
"datea" timestamp, -- date 100% "datep2" timestamp, -- date fin planifiee si action non ponctuelle
"datea" timestamp, -- date debut realisation
"datea2" timestamp, -- date fin realisation si action non ponctuelle
"tms" timestamp, -- date modif "tms" timestamp, -- date modif
"fk_action" integer, "fk_action" integer, -- type de l'action
"label" varchar(50) NOT NULL, -- libelle de l'action "label" varchar(50) NOT NULL, -- libelle de l'action
"fk_project" integer,
"fk_soc" integer, "fk_soc" integer,
"fk_contact" integer default 0, "fk_contact" integer,
"fk_parent" integer NOT NULL default 0,
"fk_user_action" integer, -- id de la personne qui doit effectuer l'action "fk_user_action" integer, -- id de la personne qui doit effectuer l'action
"fk_user_author" integer, "fk_user_author" integer, -- id de la personne qui a effectuer l'action
"priority" smallint, "priority" smallint,
"punctual" smallint NOT NULL default 1,
"percent" smallint NOT NULL default 0, "percent" smallint NOT NULL default 0,
"durationp" real, -- duree planifiee
"durationa" real, -- duree reellement passee
"note" text, "note" text,
"propalrowid" integer, "propalrowid" integer,
"fk_commande" integer, "fk_commande" integer,

View File

@@ -4,7 +4,8 @@
-- =================================================================== -- ===================================================================
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org> -- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -26,37 +27,40 @@
-- =================================================================== -- ===================================================================
-- --
-- statut -- statut
-- 0 : non adherent -- -1 : brouillon
-- 1 : adherent -- 0 : resilie
-- 1 : valide
create table llx_adherent create table llx_adherent
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "nom" varchar(50),
"statut" smallint NOT NULL DEFAULT 0, "prenom" varchar(50),
"public" smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ? "login" varchar(50) NOT NULL, -- login
"pass" varchar(50), -- password
"fk_adherent_type" smallint, "fk_adherent_type" smallint,
"morphy" varchar(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique "morphy" varchar(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique
"datevalid" timestamp, -- date de validation
"datec" timestamp, -- date de creation
"prenom" varchar(50),
"nom" varchar(50),
"societe" varchar(50), "societe" varchar(50),
"adresse" text, "adresse" text,
"cp" varchar(30), "cp" varchar(30),
"ville" varchar(50), "ville" varchar(50),
"pays" varchar(50), "pays" varchar(50),
"email" varchar(255), "email" varchar(255),
"login" varchar(50) NOT NULL, -- login utilise pour editer sa fiche "phone" varchar(30),
"pass" varchar(50), -- pass utilise pour editer sa fiche "phone_perso" varchar(30),
"phone_mobile" varchar(30),
"naiss" date, -- date de naissance "naiss" date, -- date de naissance
"photo" varchar(255), -- url vers la photo de l'adherent "photo" varchar(255), -- url vers photo
"fk_user_author" integer NOT NULL, "statut" smallint NOT NULL DEFAULT 0,
"fk_user_mod" integer NOT NULL, "public" smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ?
"fk_user_valid" integer NOT NULL,
"datefin" timestamp, -- date de fin de validit<69> de la cotisation "datefin" timestamp, -- date de fin de validit<69> de la cotisation
"note" text, "note" text,
"datevalid" timestamp, -- date de validation
"datec" timestamp, -- date de creation
"tms" timestamp, -- date de modification
"fk_user_author" integer NOT NULL,
"fk_user_mod" integer NOT NULL,
"fk_user_valid" integer NOT NULL,
UNIQUE(login) UNIQUE(login)
); );

View File

@@ -0,0 +1,28 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_adherent_type.key.sql,v 1.3 2007/05/05 16:08:12 eldy Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_adherent_type.key.sql,v $
--
-- ============================================================================
ALTER TABLE llx_adherent_type ADD UNIQUE uk_adherent_type_libelle (libelle);

View File

@@ -34,7 +34,7 @@ create table llx_adherent_type
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"statut" smallint NOT NULL DEFAULT 0, "statut" smallint NOT NULL DEFAULT 0,
"libelle" varchar(50), "libelle" varchar(50) NOT NULL,
"cotisation" varchar(3) CHECK (cotisation IN ('yes','no')) NOT NULL DEFAULT 'yes', "cotisation" varchar(3) CHECK (cotisation IN ('yes','no')) NOT NULL DEFAULT 'yes',
"vote" varchar(3) CHECK (vote IN ('yes','no')) NOT NULL DEFAULT 'yes', "vote" varchar(3) CHECK (vote IN ('yes','no')) NOT NULL DEFAULT 'yes',
"note" text, "note" text,

View File

@@ -3,7 +3,7 @@
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2000-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- $Id$ -- $Id$
@@ -25,8 +25,6 @@
-- --
-- =================================================================== -- ===================================================================
create table llx_bank create table llx_bank
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
@@ -43,5 +41,8 @@ create table llx_bank
"num_chq" int, "num_chq" int,
"rappro" smallint default 0, "rappro" smallint default 0,
"note" text, "note" text,
"fk_bordereau" integer DEFAULT 0,
"banque" varchar(255), -- banque pour les cheques
"emetteur" varchar(255), -- emetteur du cheque
"author" varchar(40) -- a supprimer apres migration "author" varchar(40) -- a supprimer apres migration
); );

View File

@@ -4,7 +4,7 @@
-- ============================================================================= -- =============================================================================
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ create table llx_bank_account
"code_guichet" varchar(6), "code_guichet" varchar(6),
"number" varchar(255), "number" varchar(255),
"cle_rib" varchar(5), "cle_rib" varchar(5),
"bic" varchar(10), "bic" varchar(11),
"iban_prefix" varchar(5), "iban_prefix" varchar(5),
"domiciliation" varchar(255), "domiciliation" varchar(255),
"proprio" varchar(60), "proprio" varchar(60),
@@ -49,6 +49,10 @@ create table llx_bank_account
"courant" smallint DEFAULT 0 NOT NULL, "courant" smallint DEFAULT 0 NOT NULL,
"clos" smallint DEFAULT 0 NOT NULL, "clos" smallint DEFAULT 0 NOT NULL,
"rappro" smallint DEFAULT 1, "rappro" smallint DEFAULT 1,
"url" varchar(128), "url" varchar(128),
"account_number" varchar(8) "account_number" varchar(8),
"currency_code" varchar(3) NOT NULL,
"min_allowed" integer DEFAULT 0,
"min_desired" integer DEFAULT 0,
"comment" varchar(254)
); );

View File

@@ -3,7 +3,7 @@
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005-2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -25,4 +25,6 @@
-- =================================================================== -- ===================================================================
ALTER TABLE llx_bank_url ADD UNIQUE uk_bank_url (fk_bank,url_id); ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank,type);
--ALTER TABLE llx_bank_url ADD INDEX idx_bank_url_fk_bank (fk_bank);

View File

@@ -4,6 +4,7 @@
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -31,5 +32,5 @@ create table llx_bank_url
"url_id" integer, "url_id" integer,
"url" varchar(255), "url" varchar(255),
"label" varchar(255), "label" varchar(255),
"type" varchar(8) CHECK (type IN ('company','payment','member','donation','charge')) "type" enum("?","company","payment","payment_supplier","member","subscription","donation","sc","payment_sc") NOT NULL
); );

View File

@@ -0,0 +1,41 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- $Id: llx_bordereau_cheque.sql,v 1.3 2006/12/22 14:38:16 rodolphe Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_bordereau_cheque.sql,v $
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- ===================================================================
--
-- Bordereaux de remise de cheque
--
create table llx_bordereau_cheque
(
rowid SERIAL PRIMARY KEY,
"datec" timestamp,
"date_bordereau" date,
"number" mediumint ZEROFILL,
"amount" float(12,2),
"nbcheque" smallint DEFAULT 0,
"fk_bank_account" integer,
"fk_user_author" integer,
"note" text,
"statut" int2 DEFAULT 0
);

View File

@@ -0,0 +1,33 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_boxes.key.sql,v 1.3 2006/11/01 15:15:15 eldy Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_boxes.key.sql,v $
-- ===================================================================
-- Supprimme orphelins pour permettre mont<6E>e de la cl<63>
-- V4 DELETE llx_boxes FROM llx_boxes LEFT JOIN llx_boxes_def ON llx_boxes.box_id = llx_boxes_def.rowid WHERE llx_boxes_def.rowid IS NULL;
ALTER TABLE llx_boxes ADD INDEX idx_boxes_boxid (box_id);
ALTER TABLE llx_boxes ADD CONSTRAINT fk_boxes_box_id FOREIGN KEY (box_id) REFERENCES llx_boxes_def (rowid);
ALTER TABLE llx_boxes ADD INDEX idx_boxes_fk_user (fk_user);

View File

@@ -4,6 +4,7 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -24,8 +25,8 @@
-- --
-- =========================================================================== -- ===========================================================================
-- --
-- position : 0-index.php, 1-left, 2-right -- position : 0=index.php
-- -- box_order : Box sort order
-- --
create table llx_boxes create table llx_boxes
@@ -33,5 +34,6 @@ create table llx_boxes
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"box_id" integer NOT NULL, "box_id" integer NOT NULL,
"position" smallint NOT NULL, "position" smallint NOT NULL,
"box_order" smallint default 0 NOT NULL "box_order" varchar(3) NOT NULL,
"fk_user" integer default 0 NOT NULL
); );

View File

@@ -31,6 +31,7 @@ create table llx_c_actioncomm
"code" varchar(12) UNIQUE NOT NULL, "code" varchar(12) UNIQUE NOT NULL,
"type" varchar(10) DEFAULT 'system' NOT NULL, "type" varchar(10) DEFAULT 'system' NOT NULL,
"libelle" varchar(30) NOT NULL, "libelle" varchar(30) NOT NULL,
"module" varchar(16) DEFAULT NULL,
"active" smallint DEFAULT 1 NOT NULL, "active" smallint DEFAULT 1 NOT NULL,
"todo" smallint "todo" smallint
); );

View File

@@ -0,0 +1,36 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ========================================================================
-- Copyright (C) 2007 R<>gis Houssin <regis.houssin@cap-networks.com>
--
-- $Id: llx_c_ecotaxe.sql,v 1.4 2007/07/26 17:26:10 hregis Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_c_ecotaxe.sql,v $
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- ========================================================================
create table llx_c_ecotaxe
(
rowid SERIAL PRIMARY KEY,
"code" varchar(64) UNIQUE NOT NULL, -- Code servant <20> la traduction et <20> la r<>f<EFBFBD>rence interne
"libelle" varchar(255), -- Description
"price" real(16,8), -- Montant HT
"organization" varchar(255), -- Organisme g<>rant le bar<61>me tarifaire
"fk_pays" integer NOT NULL, -- Pays correspondant
"active" smallint DEFAULT 1 NOT NULL
);

View File

@@ -0,0 +1,24 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- ============================================================================
ALTER TABLE llx_categorie ADD UNIQUE INDEX uk_categorie_ref (label,type);

View File

@@ -31,5 +31,6 @@ create table llx_categorie
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"label" VARCHAR(255), -- nom de la cat<61>gorie "label" VARCHAR(255), -- nom de la cat<61>gorie
"description" text, -- description de la cat<61>gorie "description" text, -- description de la cat<61>gorie
"visible" smallint DEFAULT 1 NOT NULL -- determine si les produits sont visible ou pas "visible" smallint DEFAULT 1 NOT NULL, -- determine si les produits sont visible ou pas
"type" smallint DEFAULT 1 NOT NULL -- Type de cat<61>gorie (product, supplier, societe)
); );

View File

@@ -1,31 +1,31 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr> -- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org> -- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_categorie_association ADD INDEX idx_categorie_association_fk_categorie_mere (fk_categorie_mere); ALTER TABLE llx_categorie_association ADD INDEX idx_categorie_association_fk_categorie_mere (fk_categorie_mere);
ALTER TABLE llx_categorie_association ADD INDEX idx_categorie_association_fk_categorie_fille (fk_categorie_fille); ALTER TABLE llx_categorie_association ADD INDEX idx_categorie_association_fk_categorie_fille (fk_categorie_fille);
ALTER TABLE llx_categorie_association ADD CONSTRAINT fk_categorie_asso_fk_categorie_mere FOREIGN KEY (fk_categorie_mere) REFERENCES llx_categorie (rowid); ALTER TABLE llx_categorie_association ADD CONSTRAINT fk_categorie_asso_fk_categorie_mere FOREIGN KEY (fk_categorie_mere) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_association ADD CONSTRAINT fk_categorie_asso_fk_categorie_fille FOREIGN KEY (fk_categorie_fille) REFERENCES llx_categorie (rowid); ALTER TABLE llx_categorie_association ADD CONSTRAINT fk_categorie_asso_fk_categorie_fille FOREIGN KEY (fk_categorie_fille) REFERENCES llx_categorie (rowid);

View File

@@ -1,29 +1,29 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr> -- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org> -- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- ============================================================================ -- ============================================================================
create table llx_categorie_association create table llx_categorie_association
( (
"fk_categorie_mere" integer NOT NULL, "fk_categorie_mere" integer NOT NULL,
"fk_categorie_fille" integer NOT NULL "fk_categorie_fille" integer NOT NULL
); );

View File

@@ -0,0 +1,34 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_categorie_fournisseur.sql,v 1.2 2006/12/06 15:10:38 rodolphe Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_categorie_fournisseur.sql,v $
--
-- ============================================================================
create table llx_categorie_fournisseur
(
"fk_categorie" integer NOT NULL,
"fk_societe" integer NOT NULL,
UNIQUE(fk_categorie, fk_societe)
);
CREATE INDEX idx_llx_categorie_fournisseur_fk_categorie_fk_societe ON llx_categorie_fournisseur (fk_categorie, fk_societe);

View File

@@ -23,9 +23,9 @@
-- --
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_categorie_product ADD PRIMARY KEY (fk_categorie, fk_product);
ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_categorie (fk_categorie); ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_product (fk_product); ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_product (fk_product);
ALTER TABLE llx_categorie_product ADD FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid); ALTER TABLE llx_categorie_product ADD CONSTRAINT fk_categorie_product_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_product ADD FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); ALTER TABLE llx_categorie_product ADD CONSTRAINT fk_categorie_product_product_rowid FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);

View File

@@ -1,29 +1,29 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr> -- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org> -- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- ============================================================================ -- ============================================================================
create table llx_categorie_product create table llx_categorie_product
( (
"fk_categorie" integer NOT NULL, "fk_categorie" integer NOT NULL,
"fk_product" integer NOT NULL "fk_product" integer NOT NULL
); );

View File

@@ -0,0 +1,29 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- ============================================================================
ALTER TABLE llx_categorie_societe ADD PRIMARY KEY (fk_categorie, fk_societe);
ALTER TABLE llx_categorie_societe ADD INDEX idx_categorie_societe_fk_categorie (fk_categorie);
ALTER TABLE llx_categorie_societe ADD INDEX idx_categorie_societe_fk_societe (fk_societe);
ALTER TABLE llx_categorie_societe ADD CONSTRAINT fk_categorie_societe_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_societe ADD CONSTRAINT fk_categorie_societe_fk_soc FOREIGN KEY (fk_societe) REFERENCES llx_societe (rowid);

View File

@@ -0,0 +1,28 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- ============================================================================
create table llx_categorie_societe
(
"fk_categorie" integer NOT NULL,
"fk_societe" integer NOT NULL
);

View File

@@ -28,7 +28,6 @@ create table llx_chargesociales
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"date_ech" timestamp, -- date d'echeance "date_ech" timestamp, -- date d'echeance
"date_pai" timestamp, -- date de paiements
"libelle" varchar(80), "libelle" varchar(80),
"fk_type" integer, "fk_type" integer,
"amount" real default 0 NOT NULL, "amount" real default 0 NOT NULL,

View File

@@ -26,7 +26,7 @@
-- Supprimme orphelins pour permettre mont<6E>e de la cl<63> -- Supprimme orphelins pour permettre mont<6E>e de la cl<63>
-- V4 DELETE llx_commande FROM llx_commande LEFT JOIN llx_societe ON llx_commande.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL; -- V4 DELETE llx_commande FROM llx_commande LEFT JOIN llx_societe ON llx_commande.fk_soc = llx_societe.rowid WHERE llx_societe.rowid IS NULL;
ALTER TABLE llx_commande ADD INDEX idx_commande_fk_soc (fk_soc); ALTER TABLE llx_commande ADD INDEX idx_commande_fk_soc (fk_soc);
ALTER TABLE llx_commande ADD CONSTRAINT fk_commande_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); ALTER TABLE llx_commande ADD CONSTRAINT fk_commande_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);

View File

@@ -48,9 +48,9 @@ create table llx_commande
"remise_percent" real default 0, "remise_percent" real default 0,
"remise_absolue" real default 0, "remise_absolue" real default 0,
"remise" real default 0, "remise" real default 0,
"tva" real default 0, "tva" real(16,8) default 0,
"total_ht" real default 0, "total_ht" real(16,8) default 0,
"total_ttc" real default 0, "total_ttc" real(16,8) default 0,
"note" text, "note" text,
"note_public" text, "note_public" text,
"model_pdf" varchar(50), "model_pdf" varchar(50),

View File

@@ -3,7 +3,7 @@
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2006-2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -26,7 +26,9 @@
-- Supprimme orphelins pour permettre mont<6E>e de la cl<63> -- Supprimme orphelins pour permettre mont<6E>e de la cl<63>
-- V4 DELETE llx_commande_fournisseur FROM llx_commande_fournisseur LEFT JOIN llx_societe ON llx_commande_fournisseur.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL; -- V4 DELETE llx_commande_fournisseur FROM llx_commande_fournisseur LEFT JOIN llx_societe ON llx_commande_fournisseur.fk_soc = llx_societe.rowid WHERE llx_societe.rowid IS NULL;
ALTER TABLE llx_commande_fournisseur ADD UNIQUE INDEX uk_commande_fournisseur_ref (ref, fk_soc);
ALTER TABLE llx_commande_fournisseur ADD INDEX idx_commande_fournisseur_fk_soc (fk_soc); ALTER TABLE llx_commande_fournisseur ADD INDEX idx_commande_fournisseur_fk_soc (fk_soc);
ALTER TABLE llx_commande_fournisseur ADD CONSTRAINT fk_commande_fournisseur_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); ALTER TABLE llx_commande_fournisseur ADD CONSTRAINT fk_commande_fournisseur_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);

View File

@@ -4,6 +4,7 @@
-- =================================================================== -- ===================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -26,7 +27,6 @@
create table llx_commande_fournisseur create table llx_commande_fournisseur
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
@@ -46,14 +46,11 @@ create table llx_commande_fournisseur
"amount_ht" real default 0, "amount_ht" real default 0,
"remise_percent" real default 0, "remise_percent" real default 0,
"remise" real default 0, "remise" real default 0,
"tva" real default 0, "tva" real(16,8) default 0,
"total_ht" real default 0, "total_ht" real(16,8) default 0,
"total_ttc" real default 0, "total_ttc" real(16,8) default 0,
"note" text, "note" text,
"note_public" text, "note_public" text,
"model_pdf" varchar(50), "model_pdf" varchar(50),
"fk_methode_commande" integer default 0, "fk_methode_commande" integer default 0
UNIQUE(ref)
); );
CREATE INDEX idx_llx_commande_fournisseur_ref ON llx_commande_fournisseur (ref);

View File

@@ -0,0 +1,26 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_commande_fournisseur_dispatch.key.sql,v 1.1 2006/12/11 17:39:39 rodolphe Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_commande_fournisseur_dispatch.key.sql,v $
-- ===================================================================
ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX (fk_commande);

View File

@@ -0,0 +1,35 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_commande_fournisseur_dispatch.sql,v 1.1 2006/12/11 17:42:13 rodolphe Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_commande_fournisseur_dispatch.sql,v $
-- ===================================================================
create table llx_commande_fournisseur_dispatch
(
rowid SERIAL PRIMARY KEY,
"fk_commande" integer,
"fk_product" integer,
"qty" float, -- quantit<69>
"fk_entrepot" integer,
"fk_user" integer,
"datec" timestamp
);

View File

@@ -3,7 +3,8 @@
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -31,10 +32,14 @@ create table llx_commande_fournisseurdet
"ref" varchar(50), "ref" varchar(50),
"label" varchar(255), "label" varchar(255),
"description" text, "description" text,
"tva_tx" real DEFAULT 19.6, -- taux tva "tva_tx" real(6,3), -- taux tva
"qty" real, -- quantit<69> "qty" real, -- quantit<69>
"remise_percent" real DEFAULT 0, -- pourcentage de remise "remise_percent" real DEFAULT 0, -- pourcentage de remise
"remise" real DEFAULT 0, -- montant de la remise "remise" real DEFAULT 0, -- montant de la remise
"subprice" real, -- prix avant remise "price" real, -- prix final
"price" real -- prix final "subprice" real(16,8), -- prix unitaire
"total_ht" real(16,8), -- Total HT de la ligne toute quantit<69> et incluant remise ligne et globale
"total_tva" real(16,8), -- Total TVA de la ligne toute quantit<69> et incluant remise ligne et globale
"total_ttc" real(16,8), -- Total TTC de la ligne toute quantit<69> et incluant remise ligne et globale
"info_bits" integer DEFAULT 0 -- TVA NPR ou non
); );

View File

@@ -0,0 +1,31 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_commandedet.key.sql,v 1.2 2006/11/01 15:15:15 eldy Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_commandedet.key.sql,v $
-- ===================================================================
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
-- V4 DELETE llx_commandedet FROM llx_commandedet LEFT JOIN llx_commande ON llx_commandedet.fk_commande = llx_commande.rowid WHERE llx_commande.rowid IS NULL;
ALTER TABLE llx_commandedet ADD INDEX idx_commandedet_fk_commande (fk_commande);
-- V4 ALTER TABLE llx_commandedet ADD CONSTRAINT fk_commandedet_fk_commande FOREIGN KEY (fk_commande) REFERENCES llx_commande (rowid);

View File

@@ -3,7 +3,8 @@
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2006-2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -26,21 +27,28 @@
create table llx_commandedet create table llx_commandedet
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_commande" integer, "fk_commande" integer,
"fk_product" integer, "fk_product" integer,
"label" varchar(255), "description" text,
"description" text, "tva_tx" real(6,3), -- taux tva
"tva_tx" real, -- taux tva "qty" real, -- quantit<69>
"qty" real, -- quantit<EFBFBD> "remise_percent" real DEFAULT 0, -- pourcentage de remise
"remise_percent" real DEFAULT 0, -- pourcentage de remise "remise" real DEFAULT 0, -- montant de la remise
"remise" real DEFAULT 0, -- montant de la remise "fk_remise_except" integer NULL, -- Lien vers table des remises fixes
"fk_remise_except" integer NULL, -- Lien vers table des remises fixes "price" real, -- prix final
"subprice" real, -- prix avant remise "subprice" real(16,8), -- prix unitaire
"price" real, -- prix final "total_ht" real(16,8), -- Total HT de la ligne toute quantit<69> et incluant remise ligne et globale
"total_ht" real, -- Total HT de la ligne toute quantit<69> et incluant remise ligne et globale "total_tva" real(16,8), -- Total TVA de la ligne toute quantit<69> et incluant remise ligne et globale
"total_tva" real, -- Total TVA de la ligne toute quantit<69> et incluant remise ligne et globale "total_ttc" real(16,8), -- Total TTC de la ligne toute quantit<69> et incluant remise ligne et globale
"total_ttc" real, -- Total TTC de la ligne toute quantit<69> et incluant remise ligne et globale "info_bits" integer DEFAULT 0, -- TVA NPR ou non
"info_bits" integer DEFAULT 0, -- TVA NPR ou non "marge_tx" real, -- taux de marge (marge sur prix d'achat)
"coef" real, -- coefficient de marge "marque_tx" real, -- taux de marque (marge sur prix de vente)
"rang" integer DEFAULT 0 "special_code" int2 DEFAULT 0, -- code pour les lignes speciales
"rang" integer DEFAULT 0
); );
--
-- Liste des codes pour special_code
--
-- 1 : frais de port
--

View File

@@ -27,12 +27,12 @@
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63> -- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
-- V4 DELETE llx_contratdet FROM llx_contratdet, llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.idp WHERE llx_contratdet.fk_contrat = llx_contrat.rowid AND llx_societe.idp IS NULL; -- V4 DELETE llx_contratdet FROM llx_contratdet, llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.rowid WHERE llx_contratdet.fk_contrat = llx_contrat.rowid AND llx_societe.rowid IS NULL;
-- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL; -- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.rowid WHERE llx_societe.rowid IS NULL;
-- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_user ON llx_contrat.fk_user_author = llx_user.rowid WHERE llx_user.rowid IS NULL; -- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_user ON llx_contrat.fk_user_author = llx_user.rowid WHERE llx_user.rowid IS NULL;
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc); ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc);
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author); ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author);
ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);

View File

@@ -1,49 +1,49 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
create table llx_contrat create table llx_contrat
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"ref" varchar(30), -- reference de contrat "ref" varchar(30), -- reference de contrat
"tms" timestamp, "tms" timestamp,
"datec" timestamp, -- date de creation de l'enregistrement "datec" timestamp, -- date de creation de l'enregistrement
"date_contrat" timestamp, "date_contrat" timestamp,
"statut" smallint DEFAULT 0, "statut" smallint DEFAULT 0,
"mise_en_service" timestamp, "mise_en_service" timestamp,
"fin_validite" timestamp, "fin_validite" timestamp,
"date_cloture" timestamp, "date_cloture" timestamp,
"fk_soc" integer NOT NULL, "fk_soc" integer NOT NULL,
"fk_projet" integer, "fk_projet" integer,
"fk_commercial_signature" integer NOT NULL, -- obsolete "fk_commercial_signature" integer NOT NULL, -- obsolete
"fk_commercial_suivi" integer NOT NULL, -- obsolete "fk_commercial_suivi" integer NOT NULL, -- obsolete
"fk_user_author" integer NOT NULL default 0, "fk_user_author" integer NOT NULL default 0,
"fk_user_mise_en_service" integer, "fk_user_mise_en_service" integer,
"fk_user_cloture" integer, "fk_user_cloture" integer,
"note" text, "note" text,
"note_public" text "note_public" text
); );

View File

@@ -1,36 +1,36 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_fk_contrat (fk_contrat); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_fk_contrat (fk_contrat);
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_fk_product (fk_product); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_fk_product (fk_product);
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_ouverture_prevue (date_ouverture_prevue); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_ouverture_prevue (date_ouverture_prevue);
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_ouverture (date_ouverture); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_ouverture (date_ouverture);
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_fin_validite (date_fin_validite); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_fin_validite (date_fin_validite);
ALTER TABLE llx_contratdet ADD CONSTRAINT fk_contratdet_fk_contrat FOREIGN KEY (fk_contrat) REFERENCES llx_contrat (rowid); ALTER TABLE llx_contratdet ADD CONSTRAINT fk_contratdet_fk_contrat FOREIGN KEY (fk_contrat) REFERENCES llx_contrat (rowid);
ALTER TABLE llx_contratdet ADD CONSTRAINT fk_contratdet_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); ALTER TABLE llx_contratdet ADD CONSTRAINT fk_contratdet_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);

View File

@@ -1,63 +1,63 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
create table llx_contratdet create table llx_contratdet
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"fk_contrat" integer NOT NULL, "fk_contrat" integer NOT NULL,
"fk_product" integer NULL, -- doit pouvoir etre nul pour ligne detail sans produits "fk_product" integer NULL, -- doit pouvoir etre nul pour ligne detail sans produits
"statut" smallint DEFAULT 0, "statut" smallint DEFAULT 0,
"label" text, -- libell<6C> du produit "label" text, -- libell<6C> du produit
"description" text, "description" text,
"date_commande" timestamp, "fk_remise_except" integer NULL, -- Lien vers table des remises fixes
"date_ouverture_prevue" timestamp, "date_commande" timestamp,
"date_ouverture" timestamp, -- date d'ouverture du service chez le client "date_ouverture_prevue" timestamp,
"date_fin_validite" timestamp, "date_ouverture" timestamp, -- date d'ouverture du service chez le client
"date_cloture" timestamp, "date_fin_validite" timestamp,
"tva_tx" real DEFAULT 19.6, -- taux tva "date_cloture" timestamp,
"qty" real, -- quantit<69> "tva_tx" real(6,3) DEFAULT 0 NOT NULL, -- taux tva
"remise_percent" real DEFAULT 0, -- pourcentage de remise "qty" real NOT NULL, -- quantit<69>
"remise" real DEFAULT 0, -- montant de la remise "remise_percent" real DEFAULT 0, -- pourcentage de remise
"fk_remise_except" integer NULL, -- Lien vers table des remises fixes "subprice" real(16,8), -- prix unitaire
"subprice" real, -- prix avant remise "price_ht" real, -- prix final (obsolete)
"price_ht" real, -- prix final "remise" real DEFAULT 0, -- montant de la remise (obsolete)
"total_ht" real, -- Total HT de la ligne toute quantit<69> et incluant remise ligne et globale "total_ht" real(16,8) NOT NULL, -- Total HT de la ligne toute quantit<69> et incluant remise ligne et globale
"total_tva" real, -- Total TVA de la ligne toute quantit<69> et incluant remise ligne et globale "total_tva" real(16,8) NOT NULL, -- Total TVA de la ligne toute quantit<69> et incluant remise ligne et globale
"total_ttc" real, -- Total TTC de la ligne toute quantit<69> et incluant remise ligne et globale "total_ttc" real(16,8) NOT NULL, -- Total TTC de la ligne toute quantit<69> et incluant remise ligne et globale
"info_bits" integer DEFAULT 0, -- TVA NPR ou non "info_bits" integer DEFAULT 0, -- TVA NPR ou non
"fk_user_author" integer NOT NULL default 0, "fk_user_author" integer NOT NULL default 0,
"fk_user_ouverture" integer, "fk_user_ouverture" integer,
"fk_user_cloture" integer, "fk_user_cloture" integer,
"commentaire" text "commentaire" text
); );

View File

@@ -0,0 +1,30 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_contratdet_log.key.sql,v 1.1 2006/08/16 22:28:09 eldy Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_contratdet_log.key.sql,v $
--
-- ============================================================================
ALTER TABLE llx_contratdet_log ADD INDEX idx_contratdet_log_fk_contratdet (fk_contratdet);
ALTER TABLE llx_contratdet_log ADD INDEX idx_contratdet_log_date (date);
ALTER TABLE llx_contratdet_log ADD CONSTRAINT fk_contratdet_log_fk_contratdet FOREIGN KEY (fk_contratdet) REFERENCES llx_contratdet (rowid);

View File

@@ -1,37 +1,37 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
create table llx_contratdet_log create table llx_contratdet_log
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"fk_contratdet" integer NOT NULL, "fk_contratdet" integer NOT NULL,
"date" timestamp, "date" timestamp,
"statut" smallint NOT NULL, "statut" smallint NOT NULL,
"fk_user_author" integer NOT NULL, "fk_user_author" integer NOT NULL,
"commentaire" text "commentaire" text
); );

View File

@@ -0,0 +1,27 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_cotisation.key.sql,v 1.2 2007/04/28 14:05:49 eldy Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_cotisation.key.sql,v $
--
-- ============================================================================
ALTER TABLE llx_cotisation ADD UNIQUE INDEX uk_cotisation (fk_adherent,dateadh);

View File

@@ -1,36 +1,36 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
create table llx_cotisation create table llx_cotisation
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"datec" timestamp, "datec" timestamp,
"fk_adherent" integer, "fk_adherent" integer,
"dateadh" timestamp, "dateadh" timestamp,
"cotisation" real, "cotisation" real,
"fk_bank" int4 DEFAULT NULL, "fk_bank" int4 DEFAULT NULL,
"note" text "note" text
); );

View File

@@ -1,39 +1,39 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
create table llx_deplacement create table llx_deplacement
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"datec" timestamp, "datec" timestamp,
"tms" timestamp, "tms" timestamp,
"dated" timestamp, "dated" timestamp,
"fk_user" integer NOT NULL, "fk_user" integer NOT NULL,
"fk_user_author" integer, "fk_user_author" integer,
"type" smallint NOT NULL, "type" smallint NOT NULL,
"km" smallint, "km" smallint,
"fk_soc" integer, "fk_soc" integer,
"note" text "note" text
); );

View File

@@ -0,0 +1,37 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_document.sql,v 1.2 2007/04/13 15:29:02 rodolphe Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_document.sql,v $
-- ===================================================================
create table llx_document
(
rowid SERIAL PRIMARY KEY,
"name" varchar(255) NOT NULL,
"file_name" varchar(255) NOT NULL,
"file_extension" varchar(5) NOT NULL,
"date_generation" timestamp NULL,
"fk_owner" integer NULL,
"fk_group" integer NULL,
"permissions" varchar(9) DEFAULT 'rw-rw-rw'
);

View File

@@ -0,0 +1,33 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_document_generator.sql,v 1.2 2007/04/13 12:23:08 rodolphe Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_document_generator.sql,v $
-- ===================================================================
create table llx_document_generator
(
rowid integer NOT NULL PRIMARY KEY,
"name" varchar(255) NOT NULL,
"classfile" varchar(255) NOT NULL,
"class" varchar(255) NOT NULL
);

View File

@@ -0,0 +1,28 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_document_model.key.sql,v 1.1 2007/01/03 22:10:23 eldy Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_document_model.key.sql,v $
--
-- ===================================================================
ALTER TABLE llx_document_model ADD UNIQUE uk_document_model (nom,type);

View File

@@ -1,37 +1,37 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- Liste des modeles de document disponibles -- Liste des modeles de document disponibles
-- --
-- =================================================================== -- ===================================================================
create table llx_document_model create table llx_document_model
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"nom" varchar(50), "nom" varchar(50),
"type" varchar(12) NOT NULL, "type" varchar(20) NOT NULL,
"libelle" varchar(255), "libelle" varchar(255),
"description" text "description" text
); );

View File

@@ -1,36 +1,36 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ======================================================================== -- ========================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ======================================================================== -- ========================================================================
create table llx_dolibarr_modules create table llx_dolibarr_modules
( (
numero integer PRIMARY KEY, numero integer PRIMARY KEY,
"active" smallint DEFAULT 0 NOT NULL, "active" smallint DEFAULT 0 NOT NULL,
"active_date" timestamp NOT NULL, "active_date" timestamp NOT NULL,
"active_version" varchar(25) NOT NULL "active_version" varchar(25) NOT NULL
); );

View File

@@ -1,34 +1,34 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_domain create table llx_domain
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"datec" timestamp, "datec" timestamp,
"label" varchar(255), "label" varchar(255),
"note" text "note" text
); );

View File

@@ -1,49 +1,49 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_don create table llx_don
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"fk_statut" smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid "fk_statut" smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid
"datec" timestamp, -- date de cr<63>ation de l'enregistrement "datec" timestamp, -- date de cr<63>ation de l'enregistrement
"datedon" timestamp, -- date du don/promesse "datedon" timestamp, -- date du don/promesse
"amount" real DEFAULT 0, "amount" real DEFAULT 0,
"fk_paiement" integer, "fk_paiement" integer,
"prenom" varchar(50), "prenom" varchar(50),
"nom" varchar(50), "nom" varchar(50),
"societe" varchar(50), "societe" varchar(50),
"adresse" text, "adresse" text,
"cp" varchar(30), "cp" varchar(30),
"ville" varchar(50), "ville" varchar(50),
"pays" varchar(50), "pays" varchar(50),
"email" varchar(255), "email" varchar(255),
"public" smallint DEFAULT 1 NOT NULL, -- le don est-il public (0,1) "public" smallint DEFAULT 1 NOT NULL, -- le don est-il public (0,1)
"fk_don_projet" integer NOT NULL, -- projet auquel est fait le don "fk_don_projet" integer NOT NULL, -- projet auquel est fait le don
"fk_user_author" integer NOT NULL, "fk_user_author" integer NOT NULL,
"fk_user_valid" integer NOT NULL, "fk_user_valid" integer NOT NULL,
"note" text "note" text
); );

View File

@@ -1,35 +1,35 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_don_projet create table llx_don_projet
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"datec" timestamp, "datec" timestamp,
"libelle" varchar(255), "libelle" varchar(255),
"fk_user_author" integer NOT NULL, "fk_user_author" integer NOT NULL,
"note" text "note" text
); );

View File

@@ -0,0 +1,37 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ========================================================================
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_droitpret_rapport.sql,v 1.2 2007/02/27 09:40:31 patrickrgn Exp $
-- $Source: /sources/dolibarr/dolibarr/mysql/tables/llx_droitpret_rapport.sql,v $
--
-- ========================================================================
CREATE TABLE `llx_droitpret_rapport` (
`rowid` int(11) NOT NULL auto_increment,
`date_envoie` datetime NOT NULL,
`format` varchar(10) NOT NULL,
`date_debut` datetime NOT NULL,
`date_fin` datetime NOT NULL,
`fichier` varchar(255) NOT NULL,
`nbfact` int(11) NOT NULL,
PRIMARY KEY (`rowid`)
) type=innodb;

View File

@@ -1,33 +1,33 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 patrick Rouillon <patrick@rouillon.net> -- Copyright (C) 2005 patrick Rouillon <patrick@rouillon.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_element_contact ALTER TABLE llx_element_contact
ADD UNIQUE INDEX idx_element_contact_idx1 (element_id, fk_c_type_contact, fk_socpeople); ADD UNIQUE INDEX idx_element_contact_idx1 (element_id, fk_c_type_contact, fk_socpeople);
ALTER TABLE llx_element_contact ALTER TABLE llx_element_contact
ADD CONSTRAINT fk_element_contact_fk_c_type_contact ADD CONSTRAINT fk_element_contact_fk_c_type_contact
FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid); FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid);

View File

@@ -1,40 +1,40 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 patrick Rouillon <patrick@rouillon.net> -- Copyright (C) 2005 patrick Rouillon <patrick@rouillon.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- Association de personnes/societes avec un element de la base (contrat, projet, propal). -- Association de personnes/societes avec un element de la base (contrat, projet, propal).
-- Permet de definir plusieur type d'intervenant sur un element. -- Permet de definir plusieur type d'intervenant sur un element.
-- i.e. commercial, adresse de facturation, prestataire... -- i.e. commercial, adresse de facturation, prestataire...
-- ============================================================================ -- ============================================================================
create table llx_element_contact create table llx_element_contact
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"datecreate" timestamp NULL, -- date de creation de l'enregistrement "datecreate" timestamp NULL, -- date de creation de l'enregistrement
"statut" smallint DEFAULT 5, -- 5 inactif, 4 actif "statut" smallint DEFAULT 5, -- 5 inactif, 4 actif
"element_id" int NOT NULL, -- la reference de l'element. "element_id" int NOT NULL, -- la reference de l'element.
"fk_c_type_contact" int NOT NULL, -- nature du contact. "fk_c_type_contact" int NOT NULL, -- nature du contact.
"fk_socpeople" integer NOT NULL "fk_socpeople" integer NOT NULL
); );

View File

@@ -1,36 +1,36 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_energie_compteur create table llx_energie_compteur
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"libelle" varchar(50), "libelle" varchar(50),
"fk_energie" integer NOT NULL, "fk_energie" integer NOT NULL,
"datec" timestamp, "datec" timestamp,
"fk_user_author" integer NOT NULL, "fk_user_author" integer NOT NULL,
"note" text "note" text
); );

View File

@@ -1,31 +1,31 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_energie_compteur_groupe create table llx_energie_compteur_groupe
( (
"fk_energie_compteur" integer NOT NULL, "fk_energie_compteur" integer NOT NULL,
"fk_energie_groupe" integer NOT NULL "fk_energie_groupe" integer NOT NULL
); );

View File

@@ -1,37 +1,37 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_energie_compteur_releve create table llx_energie_compteur_releve
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_compteur" integer NOT NULL, "fk_compteur" integer NOT NULL,
"date_releve" timestamp, "date_releve" timestamp,
"valeur" real, "valeur" real,
"datec" timestamp, "datec" timestamp,
"fk_user_author" integer NOT NULL, "fk_user_author" integer NOT NULL,
"note" text "note" text
); );

View File

@@ -1,35 +1,35 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_energie_groupe create table llx_energie_groupe
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"libelle" varchar(100), "libelle" varchar(100),
"datec" timestamp, "datec" timestamp,
"fk_user_author" integer NOT NULL, "fk_user_author" integer NOT NULL,
"note" text "note" text
); );

View File

@@ -1,43 +1,44 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
create table llx_entrepot create table llx_entrepot
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"datec" timestamp, "datec" timestamp,
"tms" timestamp, "tms" timestamp,
"label" varchar(255) UNIQUE NOT NULL, "label" varchar(255) UNIQUE NOT NULL,
"description" text, "description" text,
"lieu" varchar(64), -- r<>sum<75> lieu situation "lieu" varchar(64), -- r<>sum<75> lieu situation
"address" varchar(255), "address" varchar(255),
"cp" varchar(10), "cp" varchar(10),
"ville" varchar(50), "ville" varchar(50),
"fk_pays" integer DEFAULT 0, "fk_pays" integer DEFAULT 0,
"statut" smallint DEFAULT 1, -- 1 ouvert, 0 ferm<72> "statut" smallint DEFAULT 1, -- 1 ouvert, 0 ferm<72>
"fk_user_author" integer "valo_pmp" float(12,4), -- valoristaion du stock en PMP
); "fk_user_author" integer
);

View File

@@ -0,0 +1,37 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_entrepot_valorisation.sql,v 1.2 2006/12/13 14:18:49 rodolphe Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_entrepot_valorisation.sql,v $
--
-- ============================================================================
create table llx_entrepot_valorisation
(
rowid SERIAL PRIMARY KEY,
"tms" timestamp, -- date technique mise <20> jour automatiquement
"date_calcul" date, -- date auquel a ete calcule la valeur
"fk_entrepot" integer NOT NULL ,
"valo_pmp" float(12,4) -- valoristaion du stock en PMP
);
CREATE INDEX idx_llx_entrepot_valorisation_fk_entrepot ON llx_entrepot_valorisation (fk_entrepot);

View File

@@ -1,49 +1,49 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_expedition create table llx_expedition
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"ref" varchar(30) NOT NULL, "ref" varchar(30) NOT NULL,
"fk_commande" integer, "fk_commande" integer,
"date_creation" timestamp, -- date de creation "date_creation" timestamp, -- date de creation
"date_valid" timestamp, -- date de validation "date_valid" timestamp, -- date de validation
"date_expedition" date, -- date de l'expedition "date_expedition" date, -- date de l'expedition
"fk_user_author" integer, -- createur "fk_user_author" integer, -- createur
"fk_user_valid" integer, -- valideur "fk_user_valid" integer, -- valideur
"fk_entrepot" integer, "fk_entrepot" integer,
"fk_expedition_methode" integer, "fk_expedition_methode" integer,
"fk_statut" smallint DEFAULT 0, "fk_statut" smallint DEFAULT 0,
"note" text, "note" text,
"model_pdf" varchar(50), "model_pdf" varchar(50),
UNIQUE(ref) UNIQUE(ref)
); );
CREATE INDEX idx_llx_expedition_ref ON llx_expedition (ref); CREATE INDEX idx_llx_expedition_ref ON llx_expedition (ref);
CREATE INDEX idx_llx_expedition_fk_expedition_methode ON llx_expedition (fk_expedition_methode); CREATE INDEX idx_llx_expedition_fk_expedition_methode ON llx_expedition (fk_expedition_methode);
CREATE INDEX idx_llx_expedition_fk_commande ON llx_expedition (fk_commande); CREATE INDEX idx_llx_expedition_fk_commande ON llx_expedition (fk_commande);

View File

@@ -1,35 +1,35 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_expedition_methode create table llx_expedition_methode
( (
rowid integer PRIMARY KEY, rowid integer PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"code" varchar(30) NOT NULL, "code" varchar(30) NOT NULL,
"libelle" varchar(50) NOT NULL, "libelle" varchar(50) NOT NULL,
"description" text, "description" text,
"statut" smallint DEFAULT 0 "statut" smallint DEFAULT 0
); );

View File

@@ -1,36 +1,36 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
create table llx_expeditiondet create table llx_expeditiondet
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_expedition" integer NOT NULL, "fk_expedition" integer NOT NULL,
"fk_commande_ligne" integer NOT NULL, "fk_commande_ligne" integer NOT NULL,
"qty" real -- quantit<69> "qty" real -- quantit<69>
); );
CREATE INDEX idx_llx_expeditiondet_fk_expedition ON llx_expeditiondet (fk_expedition); CREATE INDEX idx_llx_expeditiondet_fk_expedition ON llx_expeditiondet (fk_expedition);
CREATE INDEX idx_llx_expeditiondet_fk_commande_ligne ON llx_expeditiondet (fk_commande_ligne); CREATE INDEX idx_llx_expeditiondet_fk_commande_ligne ON llx_expeditiondet (fk_commande_ligne);

View File

@@ -1,36 +1,36 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
-- --
-- $Revision$ -- $Revision$
create table llx_export_compta create table llx_export_compta
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"ref" varchar(12) NOT NULL, "ref" varchar(12) NOT NULL,
"date_export" timestamp, -- date de creation "date_export" timestamp, -- date de creation
"fk_user" integer NOT NULL, "fk_user" integer NOT NULL,
"note" text "note" text
); );

View File

@@ -0,0 +1,29 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2007 Regis Houssin <regis.houssin@cap-networks.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_export_model.key.sql,v 1.1 2007/03/23 17:58:07 hregis Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_export_model.key.sql,v $
--
-- ===================================================================
ALTER TABLE llx_export_model ADD UNIQUE uk_export_model (label);

View File

@@ -0,0 +1,37 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2007 Regis Houssin <regis.houssin@cap-networks.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_export_model.sql,v 1.2 2007/03/24 16:46:02 eldy Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_export_model.sql,v $
--
-- Liste des modeles de document disponibles
--
-- ===================================================================
create table llx_export_model
(
rowid SERIAL PRIMARY KEY,
"fk_user" integer DEFAULT 0 NOT NULL,
"label" varchar(50) NOT NULL,
"type" varchar(20) NOT NULL,
"field" text NOT NULL
);

View File

@@ -1,31 +1,31 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
create table llx_fa_pr create table llx_fa_pr
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_facture" integer, "fk_facture" integer,
"fk_propal" integer "fk_propal" integer
); );

View File

@@ -1,39 +1,41 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_facture ADD INDEX idx_facture_fk_soc (fk_soc); ALTER TABLE llx_facture ADD INDEX idx_facture_fk_soc (fk_soc);
ALTER TABLE llx_facture ADD INDEX idx_facture_fk_user_author (fk_user_author); ALTER TABLE llx_facture ADD INDEX idx_facture_fk_user_author (fk_user_author);
ALTER TABLE llx_facture ADD INDEX idx_facture_fk_user_valid (fk_user_valid); ALTER TABLE llx_facture ADD INDEX idx_facture_fk_user_valid (fk_user_valid);
ALTER TABLE llx_facture ADD INDEX idx_facture_fk_projet (fk_projet); ALTER TABLE llx_facture ADD INDEX idx_facture_fk_facture_source (fk_facture_source);
ALTER TABLE llx_facture ADD INDEX idx_facture_fk_projet (fk_projet);
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid); ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid); ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_facture_source FOREIGN KEY (fk_facture_source) REFERENCES llx_facture (rowid);
ALTER TABLE llx_facture ADD UNIQUE INDEX idx_facture_uk_facnumber (facnumber); ALTER TABLE llx_facture ADD CONSTRAINT fk_facture_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
ALTER TABLE llx_facture ADD UNIQUE INDEX idx_facture_uk_facnumber (facnumber);

View File

@@ -1,60 +1,66 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =========================================================================== -- ===========================================================================
-- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =========================================================================== -- ===========================================================================
create table llx_facture
(
rowid SERIAL PRIMARY KEY, create table llx_facture
"facnumber" varchar(30) NOT NULL, (
"ref_client" varchar(30), rowid SERIAL PRIMARY KEY,
"increment" varchar(10), "facnumber" varchar(30) NOT NULL,
"fk_soc" integer NOT NULL, "type" smallint DEFAULT 0 NOT NULL,
"datec" timestamp, -- date de creation de la facture "ref_client" varchar(30),
"datef" date, -- date de la facture "increment" varchar(10),
"date_valid" date, -- date de validation "fk_soc" integer NOT NULL,
"paye" smallint DEFAULT 0 NOT NULL, "datec" timestamp, -- date de creation de la facture
"amount" real DEFAULT 0 NOT NULL, "datef" date, -- date de la facture
"remise_percent" real DEFAULT 0, -- remise relative "date_valid" date, -- date de validation
"remise_absolue" real DEFAULT 0, -- remise absolue "paye" smallint DEFAULT 0 NOT NULL,
"remise" real DEFAULT 0, -- remise totale calculee "amount" real DEFAULT 0 NOT NULL,
"tva" real DEFAULT 0, -- montant tva apres remise totale "remise_percent" real DEFAULT 0, -- remise relative
"total" real DEFAULT 0, -- montant total ht apres remise totale "remise_absolue" real DEFAULT 0, -- remise absolue
"total_ttc" real DEFAULT 0, -- montant total ttc apres remise totale "remise" real DEFAULT 0, -- remise totale calculee
"fk_statut" smallint DEFAULT 0 NOT NULL, "close_code" varchar(16), -- Code motif cloture sans paiement complet
"fk_user_author" integer, -- createur de la facture "close_note" varchar(128), -- Commentaire cloture sans paiement complet
"fk_user_valid" integer, -- valideur de la facture "tva" real DEFAULT 0, -- montant tva apres remise totale
"fk_projet" integer, -- projet auquel est associ<63>e la facture "total" real DEFAULT 0, -- montant total ht apres remise totale
"fk_cond_reglement" integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...) "total_ttc" real DEFAULT 0, -- montant total ttc apres remise totale
"fk_mode_reglement" integer, -- mode de reglement (Virement, Pr<50>l<EFBFBD>vement) "fk_statut" smallint DEFAULT 0 NOT NULL,
"date_lim_reglement" date, -- date limite de reglement "fk_user_author" integer, -- createur de la facture
"note" text, "fk_user_valid" integer, -- valideur de la facture
"note_public" text, "fk_facture_source" integer, -- facture origine si facture avoir
"model_pdf" varchar(50) "fk_projet" integer, -- projet auquel est associ<63>e la facture
); "fk_cond_reglement" integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...)
"fk_mode_reglement" integer, -- mode de reglement (Virement, Pr<50>l<EFBFBD>vement)
"date_lim_reglement" date, -- date limite de reglement
"note" text,
"note_public" text,
"model_pdf" varchar(50)
);

View File

@@ -1,36 +1,40 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_soc (fk_soc); ALTER TABLE llx_facture_fourn ADD UNIQUE INDEX uk_facture_fourn_ref (facnumber, fk_soc);
ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_user_author (fk_user_author);
ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_user_valid (fk_user_valid); ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_date_lim_reglement (date_lim_reglement);
ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_projet (fk_projet);
ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_soc (fk_soc);
ALTER TABLE llx_facture_fourn ADD CONSTRAINT fk_facture_fourn_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_user_author (fk_user_author);
ALTER TABLE llx_facture_fourn ADD CONSTRAINT fk_facture_fourn_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_user_valid (fk_user_valid);
ALTER TABLE llx_facture_fourn ADD CONSTRAINT fk_facture_fourn_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid); ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_projet (fk_projet);
ALTER TABLE llx_facture_fourn ADD CONSTRAINT fk_facture_fourn_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
ALTER TABLE llx_facture_fourn ADD CONSTRAINT fk_facture_fourn_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
ALTER TABLE llx_facture_fourn ADD CONSTRAINT fk_facture_fourn_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
ALTER TABLE llx_facture_fourn ADD CONSTRAINT fk_facture_fourn_fk_user_valid FOREIGN KEY (fk_user_valid) REFERENCES llx_user (rowid);
ALTER TABLE llx_facture_fourn ADD CONSTRAINT fk_facture_fourn_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);

View File

@@ -1,57 +1,58 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =========================================================================== -- ===========================================================================
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- -- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
-- This program is free software; you can redistribute it and/or modify --
-- it under the terms of the GNU General Public License as published by -- This program is free software; you can redistribute it and/or modify
-- the Free Software Foundation; either version 2 of the License, or -- it under the terms of the GNU General Public License as published by
-- (at your option) any later version. -- the Free Software Foundation; either version 2 of the License, or
-- -- (at your option) any later version.
-- This program is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- This program is distributed in the hope that it will be useful,
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- GNU General Public License for more details. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- -- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License --
-- along with this program; if not, write to the Free Software -- You should have received a copy of the GNU General Public License
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- along with this program; if not, write to the Free Software
-- -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- $Id$ --
-- $Source$ -- $Id$
-- -- $Source$
-- =========================================================================== --
-- ===========================================================================
create table llx_facture_fourn create table llx_facture_fourn
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"facnumber" varchar(50) NOT NULL, "facnumber" varchar(50) NOT NULL,
"fk_soc" integer NOT NULL, "type" smallint DEFAULT 0 NOT NULL,
"datec" timestamp, -- date de creation de la facture "fk_soc" integer NOT NULL,
"datef" date, -- date de la facture "datec" timestamp, -- date de creation de la facture
"libelle" varchar(255), "datef" date, -- date de la facture
"paye" smallint DEFAULT 0 NOT NULL, "libelle" varchar(255),
"amount" real DEFAULT 0 NOT NULL, "paye" smallint DEFAULT 0 NOT NULL,
"remise" real DEFAULT 0, "amount" real(16,8) DEFAULT 0 NOT NULL,
"tva" real DEFAULT 0, "remise" real(16,8) DEFAULT 0,
"total" real DEFAULT 0, "tva" real(16,8) DEFAULT 0,
"total_ht" real DEFAULT 0, "total" real(16,8) DEFAULT 0,
"total_tva" real DEFAULT 0, "total_ht" real(16,8) DEFAULT 0,
"total_ttc" real DEFAULT 0, "total_tva" real(16,8) DEFAULT 0,
"fk_statut" smallint DEFAULT 0 NOT NULL, "total_ttc" real(16,8) DEFAULT 0,
"fk_user_author" integer, -- createur de la facture "fk_statut" smallint DEFAULT 0 NOT NULL,
"fk_user_valid" integer, -- valideur de la facture "fk_user_author" integer, -- createur de la facture
"fk_projet" integer, -- projet auquel est associ<63>e la facture "fk_user_valid" integer, -- valideur de la facture
"fk_cond_reglement" integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...) "fk_projet" integer, -- projet auquel est associ<63>e la facture
"date_lim_reglement" date, -- date limite de reglement "fk_cond_reglement" integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...)
"note" text, "date_lim_reglement" date, -- date limite de reglement
UNIQUE(facnumber, fk_soc) "note" text,
); "note_public" text
);

View File

@@ -1,31 +1,31 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
-- Supprimme orphelins pour permettre mont<6E>e de la cl<63> -- Supprimme orphelins pour permettre mont<6E>e de la cl<63>
-- V4 DELETE llx_facture_fourn_det FROM llx_facture_fourn_det LEFT JOIN llx_facture_fourn ON llx_facture_fourn_det.fk_facture_fourn = llx_facture_fourn.rowid WHERE llx_facture_fourn.rowid IS NULL; -- V4 DELETE llx_facture_fourn_det FROM llx_facture_fourn_det LEFT JOIN llx_facture_fourn ON llx_facture_fourn_det.fk_facture_fourn = llx_facture_fourn.rowid WHERE llx_facture_fourn.rowid IS NULL;
ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_facture (fk_facture_fourn); ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_facture (fk_facture_fourn);
ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid); ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid);

View File

@@ -1,39 +1,40 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
create table llx_facture_fourn_det create table llx_facture_fourn_det
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_facture_fourn" integer NOT NULL, "fk_facture_fourn" integer NOT NULL,
"fk_product" integer NULL, "fk_product" integer NULL,
"description" text, "description" text,
"pu_ht" real DEFAULT 0, "pu_ht" real(16,8),
"qty" smallint DEFAULT 1, "pu_ttc" real(16,8),
"total_ht" real DEFAULT 0, "qty" smallint DEFAULT 1,
"tva_taux" real DEFAULT 0, "tva_taux" real(16,8) DEFAULT 0,
"tva" real DEFAULT 0, "total_ht" real(16,8) DEFAULT 0,
"total_ttc" real DEFAULT 0 "tva" real(16,8) DEFAULT 0,
); "total_ttc" real(16,8) DEFAULT 0
);

View File

@@ -1,36 +1,36 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_soc (fk_soc); ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_soc (fk_soc);
ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_user_author (fk_user_author); ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_user_author (fk_user_author);
ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_projet (fk_projet); ALTER TABLE llx_facture_rec ADD INDEX idx_facture_rec_fk_projet (fk_projet);
ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid); ALTER TABLE llx_facture_rec ADD CONSTRAINT fk_facture_rec_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid);
ALTER TABLE llx_facture_rec ADD UNIQUE INDEX idx_facture_rec_uk_titre (titre); ALTER TABLE llx_facture_rec ADD UNIQUE INDEX idx_facture_rec_uk_titre (titre);

View File

@@ -1,56 +1,56 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =========================================================================== -- ===========================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =========================================================================== -- ===========================================================================
create table llx_facture_rec create table llx_facture_rec
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"titre" varchar(50) NOT NULL, "titre" varchar(50) NOT NULL,
"fk_soc" integer NOT NULL, "fk_soc" integer NOT NULL,
"datec" timestamp, -- date de creation "datec" timestamp, -- date de creation
"amount" real DEFAULT 0 NOT NULL, "amount" real DEFAULT 0 NOT NULL,
"remise" real DEFAULT 0, "remise" real DEFAULT 0,
"remise_percent" real DEFAULT 0, "remise_percent" real DEFAULT 0,
"remise_absolue" real DEFAULT 0, "remise_absolue" real DEFAULT 0,
"tva" real DEFAULT 0, "tva" real DEFAULT 0,
"total" real DEFAULT 0, "total" real DEFAULT 0,
"total_ttc" real DEFAULT 0, "total_ttc" real DEFAULT 0,
"fk_user_author" integer, -- createur "fk_user_author" integer, -- createur
"fk_projet" integer, -- projet auquel est associ<63> la facture "fk_projet" integer, -- projet auquel est associ<63> la facture
"fk_cond_reglement" integer, -- condition de reglement "fk_cond_reglement" integer DEFAULT 0, -- condition de reglement
"fk_mode_reglement" integer, -- mode de reglement (Virement, Pr<50>l<EFBFBD>vement) "fk_mode_reglement" integer DEFAULT 0, -- mode de reglement (Virement, Pr<50>l<EFBFBD>vement)
"date_lim_reglement" date, -- date limite de reglement "date_lim_reglement" date, -- date limite de reglement
"note" text, "note" text,
"note_public" text, "note_public" text,
"frequency" varchar(2) DEFAULT NULL, "frequency" varchar(2) DEFAULT NULL,
"last_gen" varchar(7) DEFAULT NULL "last_gen" varchar(7) DEFAULT NULL
); );
CREATE INDEX idx_facture_rec_fksoc ON llx_facture_rec (fk_soc); CREATE INDEX idx_facture_rec_fksoc ON llx_facture_rec (fk_soc);

View File

@@ -1,33 +1,33 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
create table llx_facture_stats create table llx_facture_stats
( (
"date_full" timestamp, "date_full" timestamp,
"date_day" date, "date_day" date,
"data" varchar(50), "data" varchar(50),
"value" real "value" real
); );

View File

@@ -1,32 +1,32 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63> -- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
-- V4 DELETE llx_facture_tva_sum FROM llx_facture_tva_sum LEFT JOIN llx_facture ON llx_facture_tva_sum.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL; -- V4 DELETE llx_facture_tva_sum FROM llx_facture_tva_sum LEFT JOIN llx_facture ON llx_facture_tva_sum.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
ALTER TABLE llx_facture_tva_sum ADD INDEX idx_facture_tva_sum_fk_facture (fk_facture); ALTER TABLE llx_facture_tva_sum ADD INDEX idx_facture_tva_sum_fk_facture (fk_facture);
ALTER TABLE llx_facture_tva_sum ADD CONSTRAINT fk_facture_tva_sum_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); ALTER TABLE llx_facture_tva_sum ADD CONSTRAINT fk_facture_tva_sum_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);

View File

@@ -1,31 +1,31 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
create table llx_facture_tva_sum create table llx_facture_tva_sum
( (
"fk_facture" integer NOT NULL, "fk_facture" integer NOT NULL,
"amount" real NOT NULL, "amount" real NOT NULL,
"tva_tx" real NOT NULL "tva_tx" real NOT NULL
); );

View File

@@ -1,31 +1,31 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63> -- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
--DELETE llx_facturedet FROM llx_facturedet LEFT JOIN llx_facture ON llx_facturedet.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL; -- V4 DELETE llx_facturedet FROM llx_facturedet LEFT JOIN llx_facture ON llx_facturedet.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_facture (fk_facture); ALTER TABLE llx_facturedet ADD INDEX idx_facturedet_fk_facture (fk_facture);
ALTER TABLE llx_facturedet ADD CONSTRAINT fk_facturedet_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); ALTER TABLE llx_facturedet ADD CONSTRAINT fk_facturedet_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);

View File

@@ -1,49 +1,49 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
create table llx_facturedet create table llx_facturedet
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_facture" integer NOT NULL, "fk_facture" integer NOT NULL,
"fk_product" integer NULL, -- Doit pouvoir etre nul pour ligne detail sans produits "fk_product" integer NULL, -- Doit pouvoir etre nul pour ligne detail sans produits
"description" text, "description" text,
"tva_taux" real, -- Taux tva produit/service (exemple 19.6) "tva_taux" real, -- Taux tva produit/service (exemple 19.6)
"qty" real, -- Quantit<69> (exemple 2) "qty" real, -- Quantit<69> (exemple 2)
"remise_percent" real DEFAULT 0, -- % de la remise ligne (exemple 20%) "remise_percent" real DEFAULT 0, -- % de la remise ligne (exemple 20%)
"remise" real DEFAULT 0, -- Montant calcul<75> de la remise % sur PU HT (exemple 20) "remise" real DEFAULT 0, -- Montant calcul<75> de la remise % sur PU HT (exemple 20)
"fk_remise_except" integer NULL, -- Lien vers table des remises fixes "fk_remise_except" integer NULL, -- Lien vers table des remises fixes
"subprice" real, -- P.U. HT (exemple 100) "subprice" real, -- P.U. HT (exemple 100)
"price" real, -- P.U. HT apres remise % de ligne "price" real, -- P.U. HT apres remise % de ligne
"total_ht" real, -- Total HT de la ligne toute quantit<69> et incluant remise ligne et globale "total_ht" real, -- Total HT de la ligne toute quantit<69> et incluant remise ligne et globale
"total_tva" real, -- Total TVA de la ligne toute quantit<69> et incluant remise ligne et globale "total_tva" real, -- Total TVA de la ligne toute quantit<69> et incluant remise ligne et globale
"total_ttc" real, -- Total TTC de la ligne toute quantit<69> et incluant remise ligne et globale "total_ttc" real, -- Total TTC de la ligne toute quantit<69> et incluant remise ligne et globale
"date_start" timestamp, -- date debut si service "date_start" timestamp, -- date debut si service
"date_end" timestamp, -- date fin si service "date_end" timestamp, -- date fin si service
"info_bits" integer DEFAULT 0, -- TVA NPR ou non "info_bits" integer DEFAULT 0, -- TVA NPR ou non
"fk_code_ventilation" integer DEFAULT 0 NOT NULL, "fk_code_ventilation" integer DEFAULT 0 NOT NULL,
"fk_export_compta" integer DEFAULT 0 NOT NULL, "fk_export_compta" integer DEFAULT 0 NOT NULL,
"rang" integer DEFAULT 0 "rang" integer DEFAULT 0
); );

View File

@@ -1,38 +1,41 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
create table llx_facturedet_rec create table llx_facturedet_rec
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_facture" integer NOT NULL, "fk_facture" integer NOT NULL,
"fk_product" integer, "fk_product" integer,
"description" text, "description" text,
"tva_taux" real DEFAULT 19.6, -- taux tva "tva_taux" real DEFAULT 19.6, -- taux tva
"qty" real, -- quantit<69> "qty" real, -- quantit<69>
"remise_percent" real DEFAULT 0, -- pourcentage de remise "remise_percent" real DEFAULT 0, -- pourcentage de remise
"remise" real DEFAULT 0, -- montant de la remise "remise" real DEFAULT 0, -- montant de la remise
"subprice" real, -- prix avant remise "subprice" real, -- prix avant remise
"price" real -- prix final "price" real, -- prix final
); "total_ht" real, -- Total HT de la ligne toute quantit<69> et incluant remise ligne et globale
"total_tva" real, -- Total TVA de la ligne toute quantit<69> et incluant remise ligne et globale
"total_ttc" real -- Total TTC de la ligne toute quantit<69> et incluant remise ligne et globale
);

View File

@@ -1,29 +1,29 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
ALTER TABLE llx_fichinter ADD INDEX idx_fichinter_fk_soc (fk_soc); ALTER TABLE llx_fichinter ADD INDEX idx_fichinter_fk_soc (fk_soc);
ALTER TABLE llx_fichinter ADD CONSTRAINT fk_fichinter_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); ALTER TABLE llx_fichinter ADD CONSTRAINT fk_fichinter_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);

View File

@@ -1,45 +1,49 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_fichinter create table llx_fichinter
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_soc" integer NOT NULL, "fk_soc" integer NOT NULL,
"fk_projet" integer DEFAULT 0, -- projet auquel est rattache la fiche "fk_projet" integer DEFAULT 0, -- projet auquel est rattache la fiche
"ref" varchar(30) NOT NULL, -- number "fk_contrat" integer DEFAULT 0, -- contrat auquel est rattache la fiche
"datec" timestamp, -- date de creation "ref" varchar(30) NOT NULL, -- number
"date_valid" timestamp, -- date de validation "tms" timestamp,
"datei" date, -- date de l'intervention "datec" timestamp, -- date de creation
"fk_user_author" integer, -- createur de la fiche "date_valid" timestamp, -- date de validation
"fk_user_valid" integer, -- valideur de la fiche "datei" date, -- date de l'intervention
"fk_statut" smallint DEFAULT 0, "fk_user_author" integer, -- createur de la fiche
"duree" real, "fk_user_valid" integer, -- valideur de la fiche
"note" text, "fk_statut" smallint DEFAULT 0,
UNIQUE(ref) "duree" real,
); "description" text,
"note_private" text,
CREATE INDEX idx_llx_fichinter_ref ON llx_fichinter (ref); "note_public" text,
UNIQUE(ref)
);
CREATE INDEX idx_llx_fichinter_ref ON llx_fichinter (ref);

View File

@@ -0,0 +1,37 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_fournisseur_ca.sql,v 1.3 2006/12/10 14:48:59 rodolphe Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_fournisseur_ca.sql,v $
--
-- ============================================================================
create table llx_fournisseur_ca
(
"fk_societe" integer,
"date_calcul" timestamp,
"year" smallint,
"ca_genere" float, -- ca genere par les ventes des produits de ce fournisseur
"ca_achat" float(11,2) DEFAULT 0, -- ca effectue aupres de ce fournisseur (somme de ses factures)
UNIQUE(fk_societe, year)
);
CREATE INDEX idx_llx_fournisseur_ca_fk_societe_year ON llx_fournisseur_ca (fk_societe, year);

View File

@@ -0,0 +1,32 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ============================================================================
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id$
-- $Source$
--
-- ============================================================================
create table llx_fournisseur_categorie
(
rowid SERIAL PRIMARY KEY,
"label" varchar(255)
);

View File

@@ -1,39 +1,39 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ======================================================================== -- ========================================================================
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ======================================================================== -- ========================================================================
create table llx_groupesociete create table llx_groupesociete
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"parent" integer UNIQUE, "parent" integer UNIQUE,
"tms" timestamp, "tms" timestamp,
"datec" timestamp, -- creation date "datec" timestamp, -- creation date
"nom" varchar(60), -- company name "nom" varchar(60), -- company name
"note" text, -- "note" text, --
"remise" real DEFAULT 0, -- remise syst<73>matique pour le client "remise" real DEFAULT 0, -- remise syst<73>matique pour le client
"fk_user_author" integer "fk_user_author" integer
); );

View File

@@ -1,40 +1,40 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ======================================================================== -- ========================================================================
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- Historique des remises au groupes de societes -- Historique des remises au groupes de societes
-- --
-- ======================================================================== -- ========================================================================
create table llx_groupesociete_remise create table llx_groupesociete_remise
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_groupe" integer NOT NULL, "fk_groupe" integer NOT NULL,
"tms" timestamp, "tms" timestamp,
"datec" timestamp, -- creation date "datec" timestamp, -- creation date
"fk_user_author" integer, -- utilisateur qui a cr<63><72> l'info "fk_user_author" integer, -- utilisateur qui a cr<63><72> l'info
"remise" real DEFAULT 0, -- remise syst<73>matique pour le client "remise" real DEFAULT 0, -- remise syst<73>matique pour le client
"note" text "note" text
); );

View File

@@ -1,51 +1,51 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_livraison create table llx_livraison
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"fk_commande" integer DEFAULT 0, -- commande auquel est rattache le bon de livraison "fk_commande" integer DEFAULT 0, -- commande auquel est rattache le bon de livraison
"fk_expedition" integer, -- expedition auquel est rattache le bon de livraison "fk_expedition" integer, -- expedition auquel est rattache le bon de livraison
"ref" varchar(30) NOT NULL, -- delivery number "ref" varchar(30) NOT NULL, -- delivery number
"date_creation" timestamp, -- date de creation "date_creation" timestamp, -- date de creation
"date_valid" timestamp, -- date de validation "date_valid" timestamp, -- date de validation
"fk_user_author" integer, -- createur du bon de livraison "fk_user_author" integer, -- createur du bon de livraison
"fk_user_valid" integer, -- valideur du bon de livraison "fk_user_valid" integer, -- valideur du bon de livraison
"fk_statut" smallint default 0, "fk_statut" smallint default 0,
"total_ht" real default 0, "total_ht" real default 0,
"total_ttc" real default 0, "total_ttc" real default 0,
"note" text, "note" text,
"note_public" text, "note_public" text,
"model_pdf" varchar(50), "model_pdf" varchar(50),
"date_livraison" date default NULL, "date_livraison" date default NULL,
"fk_adresse_livraison" integer, -- adresse de livraison "fk_adresse_livraison" integer, -- adresse de livraison
UNIQUE(ref) UNIQUE(ref)
); );
CREATE INDEX idx_llx_livraison_ref ON llx_livraison (ref); CREATE INDEX idx_llx_livraison_ref ON llx_livraison (ref);
CREATE INDEX idx_llx_livraison_fk_commande ON llx_livraison (fk_commande); CREATE INDEX idx_llx_livraison_fk_commande ON llx_livraison (fk_commande);

View File

@@ -1,35 +1,35 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- =================================================================== -- ===================================================================
create table llx_livraisondet create table llx_livraisondet
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_livraison" integer, "fk_livraison" integer,
"fk_commande_ligne" integer NOT NULL, "fk_commande_ligne" integer NOT NULL,
"qty" real -- quantit<69> "qty" real -- quantit<69>
); );
CREATE INDEX idx_llx_livraisondet_fk_livraison ON llx_livraisondet (fk_livraison); CREATE INDEX idx_llx_livraisondet_fk_livraison ON llx_livraisondet (fk_livraison);
CREATE INDEX idx_llx_livraisondet_fk_commande_ligne ON llx_livraisondet (fk_commande_ligne); CREATE INDEX idx_llx_livraisondet_fk_commande_ligne ON llx_livraisondet (fk_commande_ligne);

View File

@@ -1,59 +1,59 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ======================================================================== -- ========================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ======================================================================== -- ========================================================================
-- --
-- redaction : 0 -- redaction : 0
-- valide : 1 -- valide : 1
-- approuv<75> : 2 -- approuv<75> : 2
-- envoye : 3 -- envoye : 3
create table llx_mailing create table llx_mailing
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"statut" smallint DEFAULT 0, -- "statut" smallint DEFAULT 0, --
"date_envoi" timestamp, -- date d'envoi "titre" varchar(60), -- company name
"titre" varchar(60), -- company name "sujet" varchar(60), -- company name
"sujet" varchar(60), -- company name "body" text,
"body" text, "cible" varchar(60),
"cible" varchar(60), "nbemail" integer,
"nbemail" integer, "email_from" varchar(160), -- company name
"email_from" varchar(160), -- company name "email_replyto" varchar(160), -- company name
"email_replyto" varchar(160), -- company name "email_errorsto" varchar(160), -- company name
"email_errorsto" varchar(160), -- company name "date_creat" timestamp, -- creation date
"date_creat" timestamp, -- creation date "date_valid" timestamp, --
"date_valid" timestamp, -- creation date "date_appro" timestamp, --
"date_appro" timestamp, -- creation date "date_envoi" timestamp, -- date d'envoi
"fk_user_creat" integer, -- utilisateur qui a cr<63><72> l'info "fk_user_creat" integer, -- utilisateur qui a cr<63><72> l'info
"fk_user_valid" integer, -- utilisateur qui a cr<63><72> l'info "fk_user_valid" integer, -- utilisateur qui a cr<63><72> l'info
"fk_user_appro" integer -- utilisateur qui a cr<63><72> l'info "fk_user_appro" integer -- utilisateur qui a cr<63><72> l'info
); );

View File

@@ -1,28 +1,28 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
ALTER TABLE llx_mailing_cibles ADD UNIQUE uk_mailing_cibles (fk_mailing, email); ALTER TABLE llx_mailing_cibles ADD UNIQUE uk_mailing_cibles (fk_mailing, email);

View File

@@ -1,41 +1,41 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- ======================================================================== -- ========================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- ======================================================================== -- ========================================================================
-- --
create table llx_mailing_cibles create table llx_mailing_cibles
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"fk_mailing" integer NOT NULL, "fk_mailing" integer NOT NULL,
"fk_contact" integer NOT NULL, "fk_contact" integer NOT NULL,
"nom" varchar(160), "nom" varchar(160),
"prenom" varchar(160), "prenom" varchar(160),
"email" varchar(160) NOT NULL, "email" varchar(160) NOT NULL,
"statut" smallint NOT NULL DEFAULT 0, "statut" smallint NOT NULL DEFAULT 0,
"url" varchar(160), "url" varchar(160),
"date_envoi" timestamp "date_envoi" timestamp
); );

50
pgsql/tables/llx_menu.sql Normal file
View File

@@ -0,0 +1,50 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ========================================================================
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_menu.sql,v 1.2 2007/02/08 14:40:31 patrickrgn Exp $
-- $Source: /sources/dolibarr/dolibarr/mysql/tables/llx_menu.sql,v $
--
-- ========================================================================
CREATE TABLE `llx_menu` (
`rowid` int(11) NOT NULL,
`menu_handler` varchar(16) NOT NULL default 'auguria', -- Menu handler name
`type` enum('top','left') NOT NULL default 'left', -- Menu top or left
`mainmenu` varchar(100) NOT NULL, -- Name family/module (home, companies, ...)
`fk_menu` int(11) NOT NULL, -- 0 or Id of mother menu line
`order` tinyint(4) NOT NULL, -- Order of entry
`url` varchar(255) NOT NULL, -- Relative (or absolute) url to go
`target` varchar(100) NULL, -- Target of Url link
`titre` varchar(255) NOT NULL, -- Key for menu translation
`langs` varchar(100), -- Lang file to load for translation
`level` tinyint(1), -- ???
`leftmenu` varchar(100) NULL, -- Condition to show or hide
`right` varchar(255), -- Condition to show enabled or disabled
`user` tinyint(4) NOT NULL default '0', -- 0 if menu for all users, 1 for external only, 2 for internal only
PRIMARY KEY (`rowid`)
) type=innodb;

View File

@@ -0,0 +1,33 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ========================================================================
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_menu_const.key.sql,v 1.2 2007/02/08 14:40:31 patrickrgn Exp $
-- $Source: /sources/dolibarr/dolibarr/mysql/tables/llx_menu_const.key.sql,v $
--
-- ========================================================================
ALTER TABLE `llx_menu_const` ADD INDEX `idx_menu_const_fk_menu` (`fk_menu`);
ALTER TABLE `llx_menu_const` ADD INDEX `idx_menu_const_fk_constraint` (`fk_constraint`);
ALTER TABLE `llx_menu_const` ADD CONSTRAINT `fk_menu_const_fk_menu` FOREIGN KEY (`fk_menu`) REFERENCES `llx_menu` (`rowid`);
ALTER TABLE `llx_menu_const` ADD CONSTRAINT `fk_menu_const_fk_constraint` FOREIGN KEY (`fk_constraint`) REFERENCES `llx_menu_constraint` (`rowid`);

View File

@@ -0,0 +1,37 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ========================================================================
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_menu_const.sql,v 1.2 2007/02/08 14:40:31 patrickrgn Exp $
-- $Source: /sources/dolibarr/dolibarr/mysql/tables/llx_menu_const.sql,v $
--
-- ========================================================================
CREATE TABLE `llx_menu_const` (
`rowid` int(11) NOT NULL auto_increment,
`fk_menu` int(11) NOT NULL,
`fk_constraint` int(11) NOT NULL,
`user` tinyint(4) NOT NULL default '2',
PRIMARY KEY (`rowid`),
KEY `fk_menu` (`fk_menu`),
KEY `fk_constraint` (`fk_constraint`)
) type=innodb;

View File

@@ -0,0 +1,32 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ========================================================================
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_menu_conqtraint.sql,v 1.2 2007/02/08 14:40:31 patrickrgn Exp $
-- $Source: /sources/dolibarr/dolibarr/mysql/tables/llx_menu_constraint.sql,v $
--
-- ========================================================================
CREATE TABLE `llx_menu_constraint` (
`rowid` int(11) NOT NULL,
`action` varchar(255) NOT NULL,
PRIMARY KEY (`rowid`)
) type=innodb;

View File

@@ -1,36 +1,36 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_notify create table llx_notify
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"daten" timestamp, -- date de la notification "daten" timestamp, -- date de la notification
"fk_action" integer NOT NULL, "fk_action" integer NOT NULL,
"fk_contact" integer NOT NULL, "fk_contact" integer NOT NULL,
"objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale')) , "objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale')) ,
"objet_id" integer NOT NULL "objet_id" integer NOT NULL
); );

View File

@@ -1,35 +1,35 @@
-- Generated from dolibarr_mysql2pgsql -- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc. -- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur. -- (c) 2005, Laurent Destailleur.
-- =================================================================== -- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or -- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version. -- (at your option) any later version.
-- --
-- This program is distributed in the hope that it will be useful, -- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of -- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details. -- GNU General Public License for more details.
-- --
-- You should have received a copy of the GNU General Public License -- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software -- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-- --
-- $Id$ -- $Id$
-- $Source$ -- $Source$
-- --
-- =================================================================== -- ===================================================================
create table llx_notify_def create table llx_notify_def
( (
rowid SERIAL PRIMARY KEY, rowid SERIAL PRIMARY KEY,
"tms" timestamp, "tms" timestamp,
"datec" date, -- date de creation "datec" date, -- date de creation
"fk_action" integer NOT NULL, "fk_action" integer NOT NULL,
"fk_soc" integer NOT NULL, "fk_soc" integer NOT NULL,
"fk_contact" integer NOT NULL "fk_contact" integer NOT NULL
); );

View File

@@ -0,0 +1,33 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- phpMyAdmin SQL Dump
-- version 2.6.2-Debian-3sarge3
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- G<>n<EFBFBD>r<EFBFBD> le : Mercredi 20 Juin 2007 <20> 15:13
-- Version du serveur: 4.0.24
-- Version de PHP: 4.3.10-19
--
-- Base de donn<6E>es: `dolidev`
--
-- --------------------------------------------------------
--
-- Structure de la table `llx_osc_categories`
--
CREATE TABLE llx_osc_categories (
rowid SERIAL PRIMARY KEY,
"dolicatid" int4 NOT NULL default '0',
"osccatid" int4 NOT NULL default '0',
UNIQUE(dolicatid),
UNIQUE(osccatid)
) TYPE=InnoDB COMMENT='Correspondance categorie Dolibarr categorie OSC';
CREATE INDEX idx_llx_osc_categories_rowid ON llx_osc_categories (rowid);
CREATE INDEX dolicatid ON llx_osc_categories (dolicatid);
CREATE INDEX osccatid ON llx_osc_categories (osccatid);

View File

@@ -0,0 +1,28 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_osc_customer.key.sql,v 1.2 2007/06/11 22:52:15 hregis Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_osc_customer.key.sql,v $
--
-- ===================================================================
ALTER TABLE llx_osc_customer ADD CONSTRAINT fk_osc_customer_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);

View File

@@ -0,0 +1,33 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_osc_customer.sql,v 1.2 2007/06/11 22:52:15 hregis Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_osc_customer.sql,v $
--
-- ===================================================================
CREATE TABLE IF NOT EXISTS `llx_osc_customer` (
"`rowid`" int4 NOT NULL default '0',
"`datem`" timestamp default NULL,
"`fk_soc`" int4 NOT NULL default '0',
PRIMARY KEY (`rowid`),
"UNIQUE" UNIQUE (`fk_soc`)
) TYPE=InnoDB COMMENT='Table transition client OSC - societe Dolibarr';

View File

@@ -0,0 +1,33 @@
-- Generated from dolibarr_mysql2pgsql
-- (c) 2004, PostgreSQL Inc.
-- (c) 2005, Laurent Destailleur.
-- ===================================================================
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- $Id: llx_osc_order.sql,v 1.3 2007/06/11 22:52:15 hregis Exp $
-- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_osc_order.sql,v $
--
-- ===================================================================
CREATE TABLE IF NOT EXISTS `llx_osc_order` (
"`rowid`" int4 NOT NULL default '0',
"`datem`" timestamp default NULL,
"`fk_commande`" int4 NOT NULL default '0',
PRIMARY KEY (`rowid`),
"UNIQUE" UNIQUE (`fk_commande`)
) TYPE=InnoDB COMMENT='Table transition commande OSC - commande Dolibarr';

Some files were not shown because too many files have changed in this diff Show More