From 3a48aae45245d7c6de980a21d04459ce3fed51a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Dec 2007 22:06:32 +0000 Subject: [PATCH] Nettoyage script sql pour release --- ChangeLog | 1 + build/dolibarr_mysql2pgsql.pl | 4 +- pgsql/tables/llx_accountingaccount.key.sql | 61 ++++--- pgsql/tables/llx_accountingaccount.sql | 69 ++++---- pgsql/tables/llx_accountingdebcred.sql | 63 ++++---- pgsql/tables/llx_accountingsystem.sql | 69 ++++---- pgsql/tables/llx_accountingtransaction.sql | 73 +++++---- pgsql/tables/llx_action_def.sql | 72 ++++----- pgsql/tables/llx_actioncomm.key.sql | 60 ++++--- pgsql/tables/llx_actioncomm.sql | 126 +++++++-------- pgsql/tables/llx_adherent.sql | 132 ++++++++------- pgsql/tables/llx_adherent_options.sql | 72 ++++----- pgsql/tables/llx_adherent_options_label.sql | 64 ++++---- pgsql/tables/llx_adherent_type.key.sql | 54 +++---- pgsql/tables/llx_adherent_type.sql | 82 +++++----- pgsql/tables/llx_appro.sql | 72 ++++----- pgsql/tables/llx_bank.sql | 94 ++++++----- pgsql/tables/llx_bank_account.key.sql | 54 +++---- pgsql/tables/llx_bank_account.sql | 115 +++++++------ pgsql/tables/llx_bank_categ.sql | 58 +++---- pgsql/tables/llx_bank_class.sql | 64 ++++---- pgsql/tables/llx_bank_url.key.sql | 56 ++++--- pgsql/tables/llx_bank_url.sql | 70 ++++---- pgsql/tables/llx_bookmark.key.sql | 54 +++---- pgsql/tables/llx_bookmark.sql | 70 ++++---- pgsql/tables/llx_bookmark4u_login.sql | 70 ++++---- pgsql/tables/llx_bordereau_cheque.sql | 82 +++++----- pgsql/tables/llx_boxes.key.sql | 66 ++++---- pgsql/tables/llx_boxes.sql | 77 +++++---- pgsql/tables/llx_boxes_def.sql | 64 ++++---- pgsql/tables/llx_c_actioncomm.sql | 72 ++++----- pgsql/tables/llx_c_ape.sql | 76 +++++---- pgsql/tables/llx_c_chargesociales.sql | 73 +++++---- pgsql/tables/llx_c_civilite.sql | 67 ++++---- pgsql/tables/llx_c_currencies.key.sql | 54 +++---- pgsql/tables/llx_c_currencies.sql | 66 ++++---- pgsql/tables/llx_c_departements.key.sql | 60 ++++--- pgsql/tables/llx_c_departements.sql | 80 +++++----- pgsql/tables/llx_c_ecotaxe.sql | 68 ++++---- pgsql/tables/llx_c_effectif.sql | 68 ++++---- pgsql/tables/llx_c_forme_juridique.sql | 72 ++++----- .../llx_c_methode_commande_fournisseur.sql | 76 +++++---- pgsql/tables/llx_c_paiement.sql | 87 +++++----- pgsql/tables/llx_c_pays.key.sql | 58 ++++--- pgsql/tables/llx_c_pays.sql | 68 ++++---- pgsql/tables/llx_c_propalst.sql | 68 ++++---- pgsql/tables/llx_c_regions.key.sql | 56 ++++--- pgsql/tables/llx_c_regions.sql | 74 +++++---- pgsql/tables/llx_c_stcomm.sql | 68 ++++---- pgsql/tables/llx_c_tva.sql | 72 ++++----- pgsql/tables/llx_c_type_contact.key.sql | 76 +++++---- pgsql/tables/llx_c_type_contact.sql | 88 +++++----- pgsql/tables/llx_c_typent.sql | 76 +++++---- pgsql/tables/llx_categorie.key.sql | 49 +++--- pgsql/tables/llx_categorie.sql | 70 ++++---- .../tables/llx_categorie_association.key.sql | 63 ++++---- pgsql/tables/llx_categorie_association.sql | 59 +++---- pgsql/tables/llx_categorie_fournisseur.sql | 66 ++++---- pgsql/tables/llx_categorie_product.key.sql | 63 ++++---- pgsql/tables/llx_categorie_product.sql | 59 +++---- pgsql/tables/llx_categorie_societe.key.sql | 59 +++---- pgsql/tables/llx_categorie_societe.sql | 57 +++---- pgsql/tables/llx_chargesociales.sql | 78 ++++----- pgsql/tables/llx_co_fa.sql | 69 ++++---- pgsql/tables/llx_co_pr.sql | 61 ++++--- pgsql/tables/llx_comfourn_facfourn.sql | 71 ++++---- pgsql/tables/llx_commande.key.sql | 62 ++++--- pgsql/tables/llx_commande.sql | 128 ++++++++------- pgsql/tables/llx_commande_fournisseur.key.sql | 66 ++++---- pgsql/tables/llx_commande_fournisseur.sql | 110 +++++++------ .../llx_commande_fournisseur_dispatch.key.sql | 49 +++--- .../llx_commande_fournisseur_dispatch.sql | 69 ++++---- pgsql/tables/llx_commande_fournisseur_log.sql | 68 ++++---- pgsql/tables/llx_commande_fournisseurdet.sql | 89 +++++------ pgsql/tables/llx_commandedet.key.sql | 61 ++++--- pgsql/tables/llx_commandedet.sql | 106 ++++++------ pgsql/tables/llx_compta.sql | 78 +++++---- pgsql/tables/llx_compta_account.sql | 73 ++++----- pgsql/tables/llx_compta_compte_generaux.sql | 76 +++++---- pgsql/tables/llx_cond_reglement.sql | 74 +++++---- pgsql/tables/llx_const.sql | 85 +++++----- pgsql/tables/llx_contrat.key.sql | 72 ++++----- pgsql/tables/llx_contrat.sql | 96 ++++++----- pgsql/tables/llx_contratdet.key.sql | 70 ++++---- pgsql/tables/llx_contratdet.sql | 124 +++++++------- pgsql/tables/llx_contratdet_log.key.sql | 58 ++++--- pgsql/tables/llx_contratdet_log.sql | 72 ++++----- pgsql/tables/llx_cotisation.key.sql | 52 +++--- pgsql/tables/llx_cotisation.sql | 72 ++++----- pgsql/tables/llx_deplacement.sql | 76 +++++---- pgsql/tables/llx_document.sql | 73 +++++---- pgsql/tables/llx_document_generator.sql | 65 ++++---- pgsql/tables/llx_document_model.key.sql | 54 +++---- pgsql/tables/llx_document_model.sql | 70 ++++---- pgsql/tables/llx_dolibarr_modules.sql | 70 ++++---- pgsql/tables/llx_domain.sql | 66 ++++---- pgsql/tables/llx_don.sql | 97 ++++++----- pgsql/tables/llx_don_projet.sql | 68 ++++---- pgsql/tables/llx_droitpret_rapport.sql | 72 ++++----- pgsql/tables/llx_element_contact.key.sql | 70 ++++---- pgsql/tables/llx_element_contact.sql | 79 +++++---- pgsql/tables/llx_energie_compteur.sql | 70 ++++---- pgsql/tables/llx_energie_compteur_groupe.sql | 60 ++++--- pgsql/tables/llx_energie_compteur_releve.sql | 72 ++++----- pgsql/tables/llx_energie_groupe.sql | 68 ++++---- pgsql/tables/llx_entrepot.sql | 86 +++++----- pgsql/tables/llx_entrepot_valorisation.sql | 72 ++++----- pgsql/tables/llx_expedition.sql | 96 ++++++----- pgsql/tables/llx_expedition_methode.sql | 68 ++++---- pgsql/tables/llx_expeditiondet.sql | 71 ++++---- pgsql/tables/llx_export_compta.sql | 70 ++++---- pgsql/tables/llx_export_model.key.sql | 54 +++---- pgsql/tables/llx_export_model.sql | 70 ++++---- pgsql/tables/llx_fa_pr.sql | 62 +++---- pgsql/tables/llx_facture.key.sql | 80 +++++----- pgsql/tables/llx_facture.sql | 132 +++++++-------- pgsql/tables/llx_facture_fourn.key.sql | 78 +++++---- pgsql/tables/llx_facture_fourn.sql | 114 +++++++------ pgsql/tables/llx_facture_fourn_det.key.sql | 61 ++++--- pgsql/tables/llx_facture_fourn_det.sql | 79 +++++---- pgsql/tables/llx_facture_rec.key.sql | 70 ++++---- pgsql/tables/llx_facture_rec.sql | 111 +++++++------ pgsql/tables/llx_facture_stats.sql | 65 ++++---- pgsql/tables/llx_facture_tva_sum.key.sql | 63 ++++---- pgsql/tables/llx_facture_tva_sum.sql | 61 ++++--- pgsql/tables/llx_facturedet.key.sql | 61 ++++--- pgsql/tables/llx_facturedet.sql | 107 +++++++------ pgsql/tables/llx_facturedet_rec.sql | 81 +++++----- pgsql/tables/llx_fichinter.key.sql | 56 ++++--- pgsql/tables/llx_fichinter.sql | 98 ++++++------ pgsql/tables/llx_fichinterdet.sql | 69 ++++---- pgsql/tables/llx_fournisseur_ca.sql | 72 ++++----- pgsql/tables/llx_groupesociete.sql | 76 +++++---- pgsql/tables/llx_groupesociete_remise.sql | 78 +++++---- pgsql/tables/llx_livraison.sql | 100 ++++++------ pgsql/tables/llx_livraisondet.sql | 69 ++++---- pgsql/tables/llx_mailing.sql | 117 +++++++------- pgsql/tables/llx_mailing_cibles.key.sql | 54 +++---- pgsql/tables/llx_mailing_cibles.sql | 79 +++++---- pgsql/tables/llx_menu.sql | 99 ++++++------ pgsql/tables/llx_menu_const.key.sql | 64 ++++---- pgsql/tables/llx_menu_const.sql | 72 ++++----- pgsql/tables/llx_menu_constraint.sql | 62 ++++--- pgsql/tables/llx_notify.sql | 70 ++++---- pgsql/tables/llx_notify_def.sql | 68 ++++---- pgsql/tables/llx_osc_categories.sql | 72 ++++----- pgsql/tables/llx_osc_customer.key.sql | 54 +++---- pgsql/tables/llx_osc_customer.sql | 68 ++++---- pgsql/tables/llx_osc_order.sql | 68 ++++---- pgsql/tables/llx_osc_product.sql | 72 ++++----- pgsql/tables/llx_paiement.sql | 95 ++++++----- pgsql/tables/llx_paiement_facture.key.sql | 69 ++++---- pgsql/tables/llx_paiement_facture.sql | 63 ++++---- pgsql/tables/llx_paiementcharge.sql | 81 +++++----- pgsql/tables/llx_paiementfourn.sql | 81 +++++----- .../llx_paiementfourn_facturefourn.key.sql | 57 ++++--- .../tables/llx_paiementfourn_facturefourn.sql | 65 ++++---- pgsql/tables/llx_prelevement_bons.sql | 98 ++++++------ pgsql/tables/llx_prelevement_facture.key.sql | 64 ++++---- pgsql/tables/llx_prelevement_facture.sql | 65 ++++---- .../llx_prelevement_facture_demande.sql | 86 +++++----- pgsql/tables/llx_prelevement_lignes.key.sql | 64 ++++---- pgsql/tables/llx_prelevement_lignes.sql | 85 +++++----- .../tables/llx_prelevement_notifications.sql | 78 ++++----- pgsql/tables/llx_prelevement_rejet.sql | 75 +++++---- pgsql/tables/llx_product.key.sql | 58 ++++--- pgsql/tables/llx_product.sql | 110 ++++++------- pgsql/tables/llx_product_ca.sql | 70 ++++---- pgsql/tables/llx_product_cnv_livre.sql | 99 ++++++------ .../tables/llx_product_cnv_livre_contrat.sql | 82 +++++----- pgsql/tables/llx_product_det.sql | 68 ++++---- pgsql/tables/llx_product_fournisseur.sql | 80 +++++----- .../llx_product_fournisseur_price.key.sql | 70 ++++---- .../tables/llx_product_fournisseur_price.sql | 76 +++++---- .../llx_product_fournisseur_price_log.sql | 71 ++++---- pgsql/tables/llx_product_price.sql | 80 +++++----- pgsql/tables/llx_product_stock.sql | 76 +++++---- pgsql/tables/llx_product_subproduct.sql | 70 ++++---- pgsql/tables/llx_projet.sql | 86 +++++----- pgsql/tables/llx_projet_task.sql | 84 +++++----- pgsql/tables/llx_projet_task_actors.sql | 74 +++++---- pgsql/tables/llx_projet_task_time.sql | 78 +++++---- pgsql/tables/llx_propal.key.sql | 60 ++++--- pgsql/tables/llx_propal.sql | 126 +++++++-------- pgsql/tables/llx_propaldet.sql | 100 ++++++------ pgsql/tables/llx_rights_def.sql | 72 ++++----- pgsql/tables/llx_so_gr.sql | 75 +++++---- pgsql/tables/llx_societe.key.sql | 62 ++++--- pgsql/tables/llx_societe.sql | 151 +++++++++--------- .../tables/llx_societe_adresse_livraison.sql | 82 +++++----- pgsql/tables/llx_societe_commerciaux.sql | 68 ++++---- pgsql/tables/llx_societe_consult.sql | 71 ++++---- pgsql/tables/llx_societe_perms.sql | 72 ++++----- pgsql/tables/llx_societe_prices.sql | 68 ++++---- pgsql/tables/llx_societe_remise.sql | 77 +++++---- .../tables/llx_societe_remise_except.key.sql | 87 +++++----- pgsql/tables/llx_societe_remise_except.sql | 84 +++++----- pgsql/tables/llx_societe_rib.sql | 92 +++++------ pgsql/tables/llx_socpeople.key.sql | 62 ++++--- pgsql/tables/llx_socpeople.sql | 100 ++++++------ pgsql/tables/llx_stock_mouvement.sql | 84 +++++----- pgsql/tables/llx_stock_valorisation.sql | 86 +++++----- pgsql/tables/llx_transaction_bplc.sql | 78 +++++---- pgsql/tables/llx_tva.sql | 73 ++++----- pgsql/tables/llx_user.key.sql | 68 ++++---- pgsql/tables/llx_user.sql | 116 +++++++------- pgsql/tables/llx_user_alert.sql | 66 ++++---- pgsql/tables/llx_user_clicktodial.sql | 71 ++++---- pgsql/tables/llx_user_entrepot.sql | 66 ++++---- pgsql/tables/llx_user_param.sql | 74 +++++---- pgsql/tables/llx_user_rights.key.sql | 64 ++++---- pgsql/tables/llx_user_rights.sql | 68 ++++---- pgsql/tables/llx_usergroup.sql | 70 ++++---- pgsql/tables/llx_usergroup_rights.key.sql | 62 ++++--- pgsql/tables/llx_usergroup_rights.sql | 72 ++++----- pgsql/tables/llx_usergroup_user.sql | 70 ++++---- pgsql/tables/llx_voyage.sql | 97 ++++++----- pgsql/tables/llx_voyage_reduc.sql | 2 +- 218 files changed, 7932 insertions(+), 8226 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6fd58172ca7..5cb33ec3ebe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ English Dolibarr changelog + ***** Changelog for 2.2 compared to 2.1 ***** - Add more statistics on main page. diff --git a/build/dolibarr_mysql2pgsql.pl b/build/dolibarr_mysql2pgsql.pl index 4e100311086..4bc0dce8f8c 100644 --- a/build/dolibarr_mysql2pgsql.pl +++ b/build/dolibarr_mysql2pgsql.pl @@ -144,7 +144,9 @@ foreach my $file (keys %filelist) { # comments or empty lines if (/^-- \$Id/) { - next; + $_ =~ s/\$//g; + print OUT $_; + next; } # comments or empty lines if (/^#/ || /^$/ || /^--/) { diff --git a/pgsql/tables/llx_accountingaccount.key.sql b/pgsql/tables/llx_accountingaccount.key.sql index 98a69d9e99e..2faf50da396 100644 --- a/pgsql/tables/llx_accountingaccount.key.sql +++ b/pgsql/tables/llx_accountingaccount.key.sql @@ -1,31 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2005-2006 Laurent Destailleur --- --- 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$ --- =========================================================================== - - -ALTER TABLE llx_accountingaccount ADD INDEX idx_accountingaccount_fk_pcg_version (fk_pcg_version); - - -ALTER TABLE llx_accountingaccount ADD CONSTRAINT fk_accountingaccount_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accountingsystem (pcg_version); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2005-2006 Laurent Destailleur +-- +-- 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_accountingaccount.key.sql,v 1.2 2007/12/02 21:51:12 eldy Exp +-- =========================================================================== + + +ALTER TABLE llx_accountingaccount ADD INDEX idx_accountingaccount_fk_pcg_version (fk_pcg_version); + + +ALTER TABLE llx_accountingaccount ADD CONSTRAINT fk_accountingaccount_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accountingsystem (pcg_version); diff --git a/pgsql/tables/llx_accountingaccount.sql b/pgsql/tables/llx_accountingaccount.sql index b69c0332c7d..ca8781c8612 100644 --- a/pgsql/tables/llx_accountingaccount.sql +++ b/pgsql/tables/llx_accountingaccount.sql @@ -1,35 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004-2006 Laurent Destailleur --- --- 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_accountingaccount -( - rowid SERIAL PRIMARY KEY, - "fk_pcg_version" varchar(12) NOT NULL, - "pcg_type" varchar(20) NOT NULL, - "pcg_subtype" varchar(20) NOT NULL, - "label" varchar(128) NOT NULL, - "account_number" varchar(20) NOT NULL, - "account_parent" varchar(20) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004-2006 Laurent Destailleur +-- +-- 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_accountingaccount.sql,v 1.2 2007/12/02 21:51:12 eldy Exp +-- ============================================================================ + +create table llx_accountingaccount +( + rowid SERIAL PRIMARY KEY, + "fk_pcg_version" varchar(12) NOT NULL, + "pcg_type" varchar(20) NOT NULL, + "pcg_subtype" varchar(20) NOT NULL, + "label" varchar(128) NOT NULL, + "account_number" varchar(20) NOT NULL, + "account_parent" varchar(20) +); diff --git a/pgsql/tables/llx_accountingdebcred.sql b/pgsql/tables/llx_accountingdebcred.sql index 1c67fe81cd5..dd6044249d8 100644 --- a/pgsql/tables/llx_accountingdebcred.sql +++ b/pgsql/tables/llx_accountingdebcred.sql @@ -1,32 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004-2006 Laurent Destailleur --- --- 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_accountingdebcred -( - "fk_transaction" integer NOT NULL, - "fk_account" integer NOT NULL, - "amount" real NOT NULL, - "direction" varchar(1) NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004-2006 Laurent Destailleur +-- +-- 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_accountingdebcred.sql,v 1.2 2007/12/02 21:51:12 eldy Exp +-- ============================================================================ + +create table llx_accountingdebcred +( + "fk_transaction" integer NOT NULL, + "fk_account" integer NOT NULL, + "amount" real NOT NULL, + "direction" varchar(1) NOT NULL +); diff --git a/pgsql/tables/llx_accountingsystem.sql b/pgsql/tables/llx_accountingsystem.sql index 736f4701944..7a304dd52ab 100644 --- a/pgsql/tables/llx_accountingsystem.sql +++ b/pgsql/tables/llx_accountingsystem.sql @@ -1,35 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004-2006 Laurent Destailleur --- --- 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_accountingsystem -( - pcg_version varchar(12) PRIMARY KEY, - "fk_pays" integer NOT NULL, - "label" varchar(128) NOT NULL, - "datec" varchar(12) NOT NULL, - "fk_author" varchar(20), - "tms" timestamp, - "active" smallint DEFAULT 0 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004-2006 Laurent Destailleur +-- +-- 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_accountingsystem.sql,v 1.3 2007/12/02 21:51:12 eldy Exp +-- ============================================================================ + +create table llx_accountingsystem +( + pcg_version varchar(12) PRIMARY KEY, + "fk_pays" integer NOT NULL, + "label" varchar(128) NOT NULL, + "datec" varchar(12) NOT NULL, + "fk_author" varchar(20), + "tms" timestamp, + "active" smallint DEFAULT 0 +); diff --git a/pgsql/tables/llx_accountingtransaction.sql b/pgsql/tables/llx_accountingtransaction.sql index 88790550464..ef7a6c62621 100644 --- a/pgsql/tables/llx_accountingtransaction.sql +++ b/pgsql/tables/llx_accountingtransaction.sql @@ -1,37 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004-2006 Laurent Destailleur --- --- 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_accountingtransaction -( - rowid SERIAL PRIMARY KEY, - "label" varchar(128) NOT NULL, - "datec" date NOT NULL, - "fk_author" varchar(20) NOT NULL, - "tms" timestamp, - "fk_facture" integer, - "fk_facture_fourn" integer, - "fk_paiement" integer, - "fk_paiement_fourn" integer -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004-2006 Laurent Destailleur +-- +-- 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_accountingtransaction.sql,v 1.3 2007/12/02 21:51:12 eldy Exp +-- ============================================================================ + +create table llx_accountingtransaction +( + rowid SERIAL PRIMARY KEY, + "label" varchar(128) NOT NULL, + "datec" date NOT NULL, + "fk_author" varchar(20) NOT NULL, + "tms" timestamp, + "fk_facture" integer, + "fk_facture_fourn" integer, + "fk_paiement" integer, + "fk_paiement_fourn" integer +); diff --git a/pgsql/tables/llx_action_def.sql b/pgsql/tables/llx_action_def.sql index 9991464cd41..25ec8b5db1a 100644 --- a/pgsql/tables/llx_action_def.sql +++ b/pgsql/tables/llx_action_def.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2004 Benoit Mortier --- Copyright (C) 2004 Guillaume Delecourt --- --- 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_action_def -( - rowid integer NOT NULL PRIMARY KEY, - "code" varchar(24) UNIQUE NOT NULL, - "tms" timestamp, - "titre" varchar(255) NOT NULL, - "description" text, - "objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale','mailing')) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2004 Benoit Mortier +-- Copyright (C) 2004 Guillaume Delecourt +-- +-- 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_action_def.sql,v 1.7 2007/12/02 21:51:12 eldy Exp +-- =================================================================== + +create table llx_action_def +( + rowid integer NOT NULL PRIMARY KEY, + "code" varchar(28) UNIQUE NOT NULL, + "tms" timestamp, + "titre" varchar(255) NOT NULL, + "description" text, + "objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale','mailing')) +); diff --git a/pgsql/tables/llx_actioncomm.key.sql b/pgsql/tables/llx_actioncomm.key.sql index 886354ffd78..6184b5f5a51 100644 --- a/pgsql/tables/llx_actioncomm.key.sql +++ b/pgsql/tables/llx_actioncomm.key.sql @@ -1,31 +1,29 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- =========================================================================== - - -ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datea (datea); -ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_soc (fk_soc); -ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_contact (fk_contact); -ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_facture (fk_facture); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_actioncomm.key.sql,v 1.2 2007/12/02 21:51:12 eldy Exp +-- =========================================================================== + + +ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datea (datea); +ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_soc (fk_soc); +ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_contact (fk_contact); +ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_fk_facture (fk_facture); diff --git a/pgsql/tables/llx_actioncomm.sql b/pgsql/tables/llx_actioncomm.sql index a70d0c97333..a5d24a2f8bb 100644 --- a/pgsql/tables/llx_actioncomm.sql +++ b/pgsql/tables/llx_actioncomm.sql @@ -1,64 +1,62 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2003 Rodolphe Quiedeville --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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. --- --- Actions commerciales --- --- ======================================================================== - - - - - -create table llx_actioncomm -( - id SERIAL PRIMARY KEY, - "datec" timestamp, -- date creation - "datep" timestamp, -- date debut planifiee - "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 - "fk_action" integer, -- type de l'action - "label" varchar(50) NOT NULL, -- libelle de l'action - "fk_project" integer, - "fk_soc" integer, - "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_author" integer, -- id de la personne qui a effectuer l'action - "priority" smallint, - "punctual" smallint NOT NULL default 1, - "percent" smallint NOT NULL default 0, - "durationp" real, -- duree planifiee - "durationa" real, -- duree reellement passee - "note" text, - "propalrowid" integer, - "fk_commande" integer, - "fk_facture" integer -); - - - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2003 Rodolphe Quiedeville +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_actioncomm.sql,v 1.11 2007/12/02 21:51:12 eldy Exp +-- +-- Actions commerciales +-- ======================================================================== + + + + + +create table llx_actioncomm +( + id SERIAL PRIMARY KEY, + "datec" timestamp, -- date creation + "datep" timestamp, -- date debut planifiee + "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 + "fk_action" integer, -- type de l'action + "label" varchar(50) NOT NULL, -- libelle de l'action + "fk_project" integer, + "fk_soc" integer, + "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_author" integer, -- id de la personne qui a effectuer l'action + "priority" smallint, + "punctual" smallint NOT NULL default 1, + "percent" smallint NOT NULL default 0, + "durationp" real, -- duree planifiee + "durationa" real, -- duree reellement passee + "note" text, + "propalrowid" integer, + "fk_commande" integer, + "fk_facture" integer +); + + + + diff --git a/pgsql/tables/llx_adherent.sql b/pgsql/tables/llx_adherent.sql index d21ac056152..360dd044b5f 100644 --- a/pgsql/tables/llx_adherent.sql +++ b/pgsql/tables/llx_adherent.sql @@ -1,67 +1,65 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2002-2004 Rodolphe Quiedeville --- Copyright (C) 2002-2003 Jean-Louis Bergamo --- Copyright (C) 2006 Laurent Destailleur --- --- 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$ --- --- =================================================================== --- --- statut --- -1 : brouillon --- 0 : resilie --- 1 : valide - -create table llx_adherent -( - rowid SERIAL PRIMARY KEY, - "nom" varchar(50), - "prenom" varchar(50), - "login" varchar(50) NOT NULL, -- login - "pass" varchar(50), -- password - "fk_adherent_type" smallint, - "morphy" varchar(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique - "societe" varchar(50), - "adresse" text, - "cp" varchar(30), - "ville" varchar(50), - "pays" varchar(50), - "email" varchar(255), - "phone" varchar(30), - "phone_perso" varchar(30), - "phone_mobile" varchar(30), - "naiss" date, -- date de naissance - "photo" varchar(255), -- url vers photo - "statut" smallint NOT NULL DEFAULT 0, - "public" smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ? - "datefin" timestamp, -- date de fin de validité de la cotisation - "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) -); - -CREATE INDEX idx_llx_adherent_login ON llx_adherent (login); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Jean-Louis Bergamo +-- Copyright (C) 2006 Laurent Destailleur +-- +-- 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.sql,v 1.21 2007/12/02 21:51:12 eldy Exp +-- =================================================================== +-- +-- statut +-- -1 : brouillon +-- 0 : resilie +-- 1 : valide + +create table llx_adherent +( + rowid SERIAL PRIMARY KEY, + "nom" varchar(50), + "prenom" varchar(50), + "login" varchar(50) NOT NULL, -- login + "pass" varchar(50), -- password + "fk_adherent_type" smallint, + "morphy" varchar(3) CHECK (morphy IN ('mor','phy')) NOT NULL, -- personne morale / personne physique + "societe" varchar(50), + "adresse" text, + "cp" varchar(30), + "ville" varchar(50), + "pays" varchar(50), + "email" varchar(255), + "phone" varchar(30), + "phone_perso" varchar(30), + "phone_mobile" varchar(30), + "naiss" date, -- date de naissance + "photo" varchar(255), -- url vers photo + "statut" smallint NOT NULL DEFAULT 0, + "public" smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils public ou pas ? + "datefin" timestamp, -- date de fin de validité de la cotisation + "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) +); + +CREATE INDEX idx_llx_adherent_login ON llx_adherent (login); diff --git a/pgsql/tables/llx_adherent_options.sql b/pgsql/tables/llx_adherent_options.sql index fcc8e88ebeb..99671fe20f5 100644 --- a/pgsql/tables/llx_adherent_options.sql +++ b/pgsql/tables/llx_adherent_options.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2002-2003 Rodolphe Quiedeville --- Copyright (C) 2002-2003 Jean-Louis Bergamo --- --- 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_adherent_options -( - optid SERIAL PRIMARY KEY, - "tms" timestamp, - "adhid" integer NOT NULL, -- id de l'adherent auquel correspond ces attributs optionnel - UNIQUE(adhid) -); - -CREATE INDEX idx_llx_adherent_options_adhid ON llx_adherent_options (adhid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Jean-Louis Bergamo +-- +-- 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_options.sql,v 1.6 2007/12/02 21:51:12 eldy Exp +-- =================================================================== + + +create table llx_adherent_options +( + optid SERIAL PRIMARY KEY, + "tms" timestamp, + "adhid" integer NOT NULL, -- id de l'adherent auquel correspond ces attributs optionnel + UNIQUE(adhid) +); + +CREATE INDEX idx_llx_adherent_options_adhid ON llx_adherent_options (adhid); diff --git a/pgsql/tables/llx_adherent_options_label.sql b/pgsql/tables/llx_adherent_options_label.sql index 534ee7c9980..d31d596f9f2 100644 --- a/pgsql/tables/llx_adherent_options_label.sql +++ b/pgsql/tables/llx_adherent_options_label.sql @@ -1,33 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2002-2003 Rodolphe Quiedeville --- Copyright (C) 2002-2003 Jean-Louis Bergamo --- --- 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_adherent_options_label -( - name varchar(64) PRIMARY KEY, -- nom de l'attribut - "tms" timestamp, - "label" varchar(255) NOT NULL -- label correspondant a l'attribut -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Jean-Louis Bergamo +-- +-- 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_options_label.sql,v 1.3 2007/12/02 21:51:12 eldy Exp +-- =================================================================== + +create table llx_adherent_options_label +( + name varchar(64) PRIMARY KEY, -- nom de l'attribut + "tms" timestamp, + "label" varchar(255) NOT NULL -- label correspondant a l'attribut +); diff --git a/pgsql/tables/llx_adherent_type.key.sql b/pgsql/tables/llx_adherent_type.key.sql index 78099ddfcfa..2351ce5bca8 100644 --- a/pgsql/tables/llx_adherent_type.key.sql +++ b/pgsql/tables/llx_adherent_type.key.sql @@ -1,28 +1,26 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2007 Laurent Destailleur --- --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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.4 2007/12/02 21:51:12 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_adherent_type ADD UNIQUE uk_adherent_type_libelle (libelle); diff --git a/pgsql/tables/llx_adherent_type.sql b/pgsql/tables/llx_adherent_type.sql index d2d633dc56b..b9abdb15fd8 100644 --- a/pgsql/tables/llx_adherent_type.sql +++ b/pgsql/tables/llx_adherent_type.sql @@ -1,42 +1,40 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2002-2003 Rodolphe Quiedeville --- Copyright (C) 2002-2003 Jean-Louis Bergamo --- --- 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$ --- --- =================================================================== --- --- statut --- 0 : actif --- 1 : inactif - -create table llx_adherent_type -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "statut" smallint NOT NULL DEFAULT 0, - "libelle" varchar(50) NOT NULL, - "cotisation" varchar(3) CHECK (cotisation IN ('yes','no')) NOT NULL DEFAULT 'yes', - "vote" varchar(3) CHECK (vote IN ('yes','no')) NOT NULL DEFAULT 'yes', - "note" text, - "mail_valid" text -- mail envoye a la validation -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- Copyright (C) 2002-2003 Jean-Louis Bergamo +-- +-- 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.sql,v 1.10 2007/12/02 21:51:12 eldy Exp +-- =================================================================== +-- +-- statut +-- 0 : actif +-- 1 : inactif + +create table llx_adherent_type +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "statut" smallint NOT NULL DEFAULT 0, + "libelle" varchar(50) NOT NULL, + "cotisation" varchar(3) CHECK (cotisation IN ('yes','no')) NOT NULL DEFAULT 'yes', + "vote" varchar(3) CHECK (vote IN ('yes','no')) NOT NULL DEFAULT 'yes', + "note" text, + "mail_valid" text -- mail envoye a la validation +); diff --git a/pgsql/tables/llx_appro.sql b/pgsql/tables/llx_appro.sql index aa9cfe3f72c..9870fef029a 100644 --- a/pgsql/tables/llx_appro.sql +++ b/pgsql/tables/llx_appro.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_appro -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "fk_product" integer NOT NULL, - "quantity" smallint NOT NULL, - "price" real, - "fk_user_author" integer -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_appro.sql,v 1.3 2007/12/02 21:53:28 eldy Exp +-- ============================================================================ + +create table llx_appro +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "fk_product" integer NOT NULL, + "quantity" smallint NOT NULL, + "price" real, + "fk_user_author" integer +); + diff --git a/pgsql/tables/llx_bank.sql b/pgsql/tables/llx_bank.sql index 10890b98840..101da5fbab3 100644 --- a/pgsql/tables/llx_bank.sql +++ b/pgsql/tables/llx_bank.sql @@ -1,48 +1,46 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2000-2006 Rodolphe Quiedeville --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_bank -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "datev" date, -- date de valeur - "dateo" date, -- date operation - "amount" real NOT NULL default 0, - "label" varchar(255), - "fk_account" integer, - "fk_user_author" integer, - "fk_user_rappro" integer, - "fk_type" varchar(4), -- CB, Virement, cheque - "num_releve" varchar(50), - "num_chq" int, - "rappro" smallint default 0, - "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 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2000-2006 Rodolphe Quiedeville +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_bank.sql,v 1.11 2007/12/02 21:53:28 eldy Exp +-- =================================================================== + +create table llx_bank +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "datev" date, -- date de valeur + "dateo" date, -- date operation + "amount" real(24,8) NOT NULL default 0, + "label" varchar(255), + "fk_account" integer, + "fk_user_author" integer, + "fk_user_rappro" integer, + "fk_type" varchar(4), -- CB, Virement, cheque + "num_releve" varchar(50), + "num_chq" int, + "rappro" smallint default 0, + "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 +); diff --git a/pgsql/tables/llx_bank_account.key.sql b/pgsql/tables/llx_bank_account.key.sql index eee225dfa7e..931e4418a57 100644 --- a/pgsql/tables/llx_bank_account.key.sql +++ b/pgsql/tables/llx_bank_account.key.sql @@ -1,28 +1,26 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -ALTER TABLE llx_bank_account ADD UNIQUE uk_bank_account_label (label); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_bank_account.key.sql,v 1.2 2007/12/02 21:53:28 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_bank_account ADD UNIQUE uk_bank_account_label (label); diff --git a/pgsql/tables/llx_bank_account.sql b/pgsql/tables/llx_bank_account.sql index 43e31f0f6ba..3de58ce917c 100644 --- a/pgsql/tables/llx_bank_account.sql +++ b/pgsql/tables/llx_bank_account.sql @@ -1,58 +1,57 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================= --- Copyright (C) 2000-2004 Rodolphe Quiedeville --- Copyright (C) 2004-2007 Laurent Destailleur --- --- 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$ --- --- --- courant : type de compte: 0 epargne, 1 courant, 2 caisse --- clos : le compte est-il clos ou encore ouvert --- --- ============================================================================= - -create table llx_bank_account -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "ref" varchar(12) NOT NULL, - "label" varchar(30) NOT NULL, - "bank" varchar(60), - "code_banque" varchar(7), - "code_guichet" varchar(6), - "number" varchar(255), - "cle_rib" varchar(5), - "bic" varchar(11), - "iban_prefix" varchar(5), - "domiciliation" varchar(255), - "proprio" varchar(60), - "adresse_proprio" varchar(255), - "courant" smallint DEFAULT 0 NOT NULL, - "clos" smallint DEFAULT 0 NOT NULL, - "rappro" smallint DEFAULT 1, - "url" varchar(128), - "account_number" varchar(8), - "currency_code" varchar(3) NOT NULL, - "min_allowed" integer DEFAULT 0, - "min_desired" integer DEFAULT 0, - "comment" varchar(254) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================= +-- Copyright (C) 2000-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2007 Laurent Destailleur +-- +-- 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_bank_account.sql,v 1.28 2007/12/02 21:53:28 eldy Exp +-- ============================================================================= + +-- courant : type de compte: 0 epargne, 1 courant, 2 caisse +-- clos : le compte est-il clos ou encore ouvert + +create table llx_bank_account +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "ref" varchar(12) NOT NULL, + "label" varchar(30) NOT NULL, + "bank" varchar(60), + "code_banque" varchar(7), + "code_guichet" varchar(6), + "number" varchar(255), + "cle_rib" varchar(5), + "bic" varchar(11), + "iban_prefix" varchar(50), -- Code IBAN + "country_iban" varchar(2), + "cle_iban" varchar(2), + "domiciliation" varchar(255), + "proprio" varchar(60), + "adresse_proprio" varchar(255), + "courant" smallint DEFAULT 0 NOT NULL, + "clos" smallint DEFAULT 0 NOT NULL, + "rappro" smallint DEFAULT 1, + "url" varchar(128), + "account_number" varchar(8), + "currency_code" varchar(3) NOT NULL, + "min_allowed" integer DEFAULT 0, + "min_desired" integer DEFAULT 0, + "comment" varchar(254) +); diff --git a/pgsql/tables/llx_bank_categ.sql b/pgsql/tables/llx_bank_categ.sql index 1b60c922002..bd4a5228332 100644 --- a/pgsql/tables/llx_bank_categ.sql +++ b/pgsql/tables/llx_bank_categ.sql @@ -1,29 +1,29 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- $Id$ --- $Source$ --- --- 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_bank_categ -( - rowid SERIAL PRIMARY KEY, - "label" varchar(255) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2004-2007 Laurent Destailleur +-- +-- 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_bank_categ.sql,v 1.4 2007/12/02 21:53:28 eldy Exp +-- =================================================================== + +create table llx_bank_categ +( + rowid SERIAL PRIMARY KEY, + "label" varchar(255) +); diff --git a/pgsql/tables/llx_bank_class.sql b/pgsql/tables/llx_bank_class.sql index f4c725d0464..79883a906a9 100644 --- a/pgsql/tables/llx_bank_class.sql +++ b/pgsql/tables/llx_bank_class.sql @@ -1,32 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- $Id$ --- $Source$ --- --- 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_bank_class -( - "lineid" integer NOT NULL, - "fk_categ" integer NOT NULL -); - -CREATE INDEX idx_llx_bank_class_lineid ON llx_bank_class (lineid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2004-2007 Laurent Destailleur +-- +-- 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_bank_class.sql,v 1.5 2007/12/02 21:53:28 eldy Exp +-- =================================================================== + + +create table llx_bank_class +( + "lineid" integer NOT NULL, + "fk_categ" integer NOT NULL +); + +CREATE INDEX idx_llx_bank_class_lineid ON llx_bank_class (lineid); diff --git a/pgsql/tables/llx_bank_url.key.sql b/pgsql/tables/llx_bank_url.key.sql index 92027872320..ffce7741bb6 100644 --- a/pgsql/tables/llx_bank_url.key.sql +++ b/pgsql/tables/llx_bank_url.key.sql @@ -1,30 +1,28 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005-2007 Laurent Destailleur --- --- 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$ --- --- =================================================================== - - -ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank,type); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005-2007 Laurent Destailleur +-- +-- 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_bank_url.key.sql,v 1.4 2007/12/02 21:53:28 eldy Exp +-- =================================================================== + + +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); \ No newline at end of file diff --git a/pgsql/tables/llx_bank_url.sql b/pgsql/tables/llx_bank_url.sql index c8a4a341566..0910d7567da 100644 --- a/pgsql/tables/llx_bank_url.sql +++ b/pgsql/tables/llx_bank_url.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2007 Laurent Destailleur --- --- 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_bank_url -( - rowid SERIAL PRIMARY KEY, - "fk_bank" integer, - "url_id" integer, - "url" varchar(255), - "label" varchar(255), - "type" varchar(16) CHECK (type IN ('?','company','payment','payment_supplier','member','subscription','donation','sc','payment_sc')) NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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_bank_url.sql,v 1.9 2007/12/02 21:53:28 eldy Exp +-- =================================================================== + +create table llx_bank_url +( + rowid SERIAL PRIMARY KEY, + "fk_bank" integer, + "url_id" integer, + "url" varchar(255), + "label" varchar(255), + "type" varchar(20) NOT NULL +); diff --git a/pgsql/tables/llx_bookmark.key.sql b/pgsql/tables/llx_bookmark.key.sql index 884cda006f1..ab34934fe97 100644 --- a/pgsql/tables/llx_bookmark.key.sql +++ b/pgsql/tables/llx_bookmark.key.sql @@ -1,29 +1,27 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- =================================================================== - - -ALTER TABLE llx_bookmark ADD UNIQUE uk_bookmark_url (fk_user, url); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_bookmark.key.sql,v 1.2 2007/12/02 21:53:28 eldy Exp +-- =================================================================== + + +ALTER TABLE llx_bookmark ADD UNIQUE uk_bookmark_url (fk_user, url); ALTER TABLE llx_bookmark ADD UNIQUE uk_bookmark_title (fk_user, title); \ No newline at end of file diff --git a/pgsql/tables/llx_bookmark.sql b/pgsql/tables/llx_bookmark.sql index dba390fbb87..e126c31a7b0 100644 --- a/pgsql/tables/llx_bookmark.sql +++ b/pgsql/tables/llx_bookmark.sql @@ -1,35 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- $Id$ --- $Source$ --- --- 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_bookmark -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer, - "fk_user" integer NOT NULL, - "dateb" timestamp, - "url" varchar(128) NOT NULL, - "target" varchar(16), - "title" varchar(64), - "favicon" varchar(24) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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_bookmark.sql,v 1.8 2007/12/02 21:53:28 eldy Exp +-- =================================================================== + +create table llx_bookmark +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer, + "fk_user" integer NOT NULL, + "dateb" timestamp, + "url" varchar(128) NOT NULL, + "target" varchar(16), + "title" varchar(64), + "favicon" varchar(24) +); diff --git a/pgsql/tables/llx_bookmark4u_login.sql b/pgsql/tables/llx_bookmark4u_login.sql index 3487873aa64..237fba389c1 100644 --- a/pgsql/tables/llx_bookmark4u_login.sql +++ b/pgsql/tables/llx_bookmark4u_login.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004 Rodolphe Quiedeville --- --- 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_bookmark4u_login -( - rowid SERIAL PRIMARY KEY, - "fk_user" integer, - "bk4u_uid" integer, - UNIQUE(fk_user) -); - -CREATE INDEX idx_llx_bookmark4u_login_fk_user ON llx_bookmark4u_login (fk_user); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- 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_bookmark4u_login.sql,v 1.2 2007/12/02 21:53:28 eldy Exp +-- =========================================================================== + + +create table llx_bookmark4u_login +( + rowid SERIAL PRIMARY KEY, + "fk_user" integer, + "bk4u_uid" integer, + UNIQUE(fk_user) +); + +CREATE INDEX idx_llx_bookmark4u_login_fk_user ON llx_bookmark4u_login (fk_user); diff --git a/pgsql/tables/llx_bordereau_cheque.sql b/pgsql/tables/llx_bordereau_cheque.sql index 0d9965d855d..173abadaf74 100644 --- a/pgsql/tables/llx_bordereau_cheque.sql +++ b/pgsql/tables/llx_bordereau_cheque.sql @@ -1,41 +1,41 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2006 Rodolphe Quiedeville --- --- $Id: llx_bordereau_cheque.sql,v 1.4 2007/08/26 19:21:40 eldy 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" integer, - "amount" float(12,2), - "nbcheque" smallint DEFAULT 0, - "fk_bank_account" integer, - "fk_user_author" integer, - "note" text, - "statut" int2 DEFAULT 0 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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_bordereau_cheque.sql,v 1.6 2007/12/02 21:53:28 eldy Exp +-- =================================================================== + +-- +-- Bordereaux de remise de cheque +-- +create table llx_bordereau_cheque +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "date_bordereau" date, -- A quoi sert cette date ? + "number" varchar(16) NOT NULL, + "amount" real(24,8) NOT NULL, + "nbcheque" smallint NOT NULL, + "fk_bank_account" integer, + "fk_user_author" integer, + "note" text, + "statut" int2 NOT NULL DEFAULT 0 +); diff --git a/pgsql/tables/llx_boxes.key.sql b/pgsql/tables/llx_boxes.key.sql index 231eee5ac3a..db97a79b4ab 100644 --- a/pgsql/tables/llx_boxes.key.sql +++ b/pgsql/tables/llx_boxes.key.sql @@ -1,33 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2006 Laurent Destailleur --- --- 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ée de la clé --- 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); \ No newline at end of file +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2006-2007 Laurent Destailleur +-- +-- 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.4 2007/12/02 14:46:08 eldy Exp +-- =================================================================== + + +ALTER TABLE llx_boxes ADD UNIQUE INDEX uk_boxes (box_id, position, fk_user); + +-- Supprime orphelins pour permettre montée de la clé +-- 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); diff --git a/pgsql/tables/llx_boxes.sql b/pgsql/tables/llx_boxes.sql index d7cf47648ae..8a36d3dcf30 100644 --- a/pgsql/tables/llx_boxes.sql +++ b/pgsql/tables/llx_boxes.sql @@ -1,39 +1,38 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2006 Laurent Destailleur --- --- 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$ --- --- =========================================================================== --- --- position : 0=index.php --- box_order : Box sort order --- - -create table llx_boxes -( - rowid SERIAL PRIMARY KEY, - "box_id" integer NOT NULL, - "position" smallint NOT NULL, - "box_order" varchar(3) NOT NULL, - "fk_user" integer default 0 NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2006 Laurent Destailleur +-- +-- 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.sql,v 1.9 2007/12/02 21:53:29 eldy Exp +-- =========================================================================== + +-- +-- position : 0=index.php +-- box_order : Box sort order +-- + +create table llx_boxes +( + rowid SERIAL PRIMARY KEY, + "box_id" integer NOT NULL, + "position" smallint NOT NULL, + "box_order" varchar(3) NOT NULL, + "fk_user" integer default 0 NOT NULL +); diff --git a/pgsql/tables/llx_boxes_def.sql b/pgsql/tables/llx_boxes_def.sql index b98e2504383..81530a18d54 100644 --- a/pgsql/tables/llx_boxes_def.sql +++ b/pgsql/tables/llx_boxes_def.sql @@ -1,33 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_boxes_def -( - rowid SERIAL PRIMARY KEY, - "name" varchar(255) NOT NULL, - "file" varchar(255) NOT NULL, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_def.sql,v 1.5 2007/12/02 21:53:29 eldy Exp +-- =========================================================================== + +create table llx_boxes_def +( + rowid SERIAL PRIMARY KEY, + "name" varchar(255) NOT NULL, + "file" varchar(255) NOT NULL, + "note" text +); diff --git a/pgsql/tables/llx_c_actioncomm.sql b/pgsql/tables/llx_c_actioncomm.sql index 45abfc82305..7c162f6dd4d 100644 --- a/pgsql/tables/llx_c_actioncomm.sql +++ b/pgsql/tables/llx_c_actioncomm.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_actioncomm -( - id integer PRIMARY KEY, - "code" varchar(12) UNIQUE NOT NULL, - "type" varchar(10) DEFAULT 'system' NOT NULL, - "libelle" varchar(30) NOT NULL, - "module" varchar(16) DEFAULT NULL, - "active" smallint DEFAULT 1 NOT NULL, - "todo" smallint -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_actioncomm.sql,v 1.8 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + +create table llx_c_actioncomm +( + id integer PRIMARY KEY, + "code" varchar(12) UNIQUE NOT NULL, + "type" varchar(10) DEFAULT 'system' NOT NULL, + "libelle" varchar(30) NOT NULL, + "module" varchar(16) DEFAULT NULL, + "active" smallint DEFAULT 1 NOT NULL, + "todo" smallint +); diff --git a/pgsql/tables/llx_c_ape.sql b/pgsql/tables/llx_c_ape.sql index 919d0d1596d..9d3dee2654c 100644 --- a/pgsql/tables/llx_c_ape.sql +++ b/pgsql/tables/llx_c_ape.sql @@ -1,39 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_ape -( - rowid SERIAL PRIMARY KEY, - "code_ape" varchar(5) NOT NULL, - "libelle" varchar(255), - "active" smallint DEFAULT 1 NOT NULL, - UNIQUE(code_ape) -); - -CREATE INDEX idx_llx_c_ape_code_ape ON llx_c_ape (code_ape); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_ape.sql,v 1.7 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + + +create table llx_c_ape +( + rowid SERIAL PRIMARY KEY, + "code_ape" varchar(5) NOT NULL, + "libelle" varchar(255), + "active" smallint DEFAULT 1 NOT NULL, + UNIQUE(code_ape) +); + +CREATE INDEX idx_llx_c_ape_code_ape ON llx_c_ape (code_ape); + diff --git a/pgsql/tables/llx_c_chargesociales.sql b/pgsql/tables/llx_c_chargesociales.sql index cf7ba95b8eb..999230fa5a4 100644 --- a/pgsql/tables/llx_c_chargesociales.sql +++ b/pgsql/tables/llx_c_chargesociales.sql @@ -1,37 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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_c_chargesociales -( - id SERIAL PRIMARY KEY, - "libelle" varchar(80), - "deductible" smallint DEFAULT 0 NOT NULL, - "active" smallint DEFAULT 1 NOT NULL -); - - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_chargesociales.sql,v 1.8 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + +create table llx_c_chargesociales +( + id SERIAL PRIMARY KEY, + "libelle" varchar(80), + "deductible" smallint DEFAULT 0 NOT NULL, + "active" smallint DEFAULT 1 NOT NULL, + "actioncompta" varchar(12) NOT NULL +); + + + diff --git a/pgsql/tables/llx_c_civilite.sql b/pgsql/tables/llx_c_civilite.sql index fb1083c90d6..250190d93cb 100644 --- a/pgsql/tables/llx_c_civilite.sql +++ b/pgsql/tables/llx_c_civilite.sql @@ -1,34 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2004 Benoit Mortier --- Copyright (C) 2004 Laurent Destailleur --- --- 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_c_civilite -( - rowid integer PRIMARY KEY, - "code" varchar(6) UNIQUE NOT NULL, - "civilite" varchar(50), - "active" smallint DEFAULT 1 NOT NULL -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2004 Benoit Mortier +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_civilite.sql,v 1.6 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + +create table llx_c_civilite +( + rowid integer PRIMARY KEY, + "code" varchar(6) UNIQUE NOT NULL, + "civilite" varchar(50), + "active" smallint DEFAULT 1 NOT NULL +); + diff --git a/pgsql/tables/llx_c_currencies.key.sql b/pgsql/tables/llx_c_currencies.key.sql index c89b9f82a6b..24eb3fc6ede 100644 --- a/pgsql/tables/llx_c_currencies.key.sql +++ b/pgsql/tables/llx_c_currencies.key.sql @@ -1,28 +1,26 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_c_currencies ADD UNIQUE uk_c_currencies_code_iso(code_iso); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_c_currencies.key.sql,v 1.2 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + + +ALTER TABLE llx_c_currencies ADD UNIQUE uk_c_currencies_code_iso(code_iso); diff --git a/pgsql/tables/llx_c_currencies.sql b/pgsql/tables/llx_c_currencies.sql index 2f04766d58d..2b240d79a8c 100644 --- a/pgsql/tables/llx_c_currencies.sql +++ b/pgsql/tables/llx_c_currencies.sql @@ -1,34 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_currencies -( - code varchar(2) PRIMARY KEY, - "code_iso" varchar(3) NOT NULL, - "label" varchar(64), - "active" smallint DEFAULT 1 NOT NULL -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_c_currencies.sql,v 1.3 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + +create table llx_c_currencies +( + code varchar(2) PRIMARY KEY, + "code_iso" varchar(3) NOT NULL, + "label" varchar(64), + "active" smallint DEFAULT 1 NOT NULL +); + diff --git a/pgsql/tables/llx_c_departements.key.sql b/pgsql/tables/llx_c_departements.key.sql index 21977b2f6e4..773a859cbe9 100644 --- a/pgsql/tables/llx_c_departements.key.sql +++ b/pgsql/tables/llx_c_departements.key.sql @@ -1,31 +1,29 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -ALTER TABLE llx_c_departements ADD UNIQUE uk_departements (code_departement,fk_region); - - -ALTER TABLE llx_c_departements ADD INDEX idx_departements_fk_region (fk_region); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_c_departements.key.sql,v 1.3 2007/12/02 21:57:09 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_c_departements ADD UNIQUE uk_departements (code_departement,fk_region); + + +ALTER TABLE llx_c_departements ADD INDEX idx_departements_fk_region (fk_region); diff --git a/pgsql/tables/llx_c_departements.sql b/pgsql/tables/llx_c_departements.sql index 05697f7ec73..1a21bb31ac8 100644 --- a/pgsql/tables/llx_c_departements.sql +++ b/pgsql/tables/llx_c_departements.sql @@ -1,41 +1,39 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_departements -( - rowid SERIAL PRIMARY KEY, - "code_departement" varchar(6) NOT NULL, - "fk_region" integer, - "cheflieu" varchar(7), - "tncc" integer, - "ncc" varchar(50), - "nom" varchar(50), - "active" smallint DEFAULT 1 NOT NULL -); - - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_departements.sql,v 1.9 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + +create table llx_c_departements +( + rowid SERIAL PRIMARY KEY, + "code_departement" varchar(6) NOT NULL, + "fk_region" integer, + "cheflieu" varchar(7), + "tncc" integer, + "ncc" varchar(50), + "nom" varchar(50), + "active" smallint DEFAULT 1 NOT NULL +); + + + diff --git a/pgsql/tables/llx_c_ecotaxe.sql b/pgsql/tables/llx_c_ecotaxe.sql index 4251b97d1f3..4fc14762de9 100644 --- a/pgsql/tables/llx_c_ecotaxe.sql +++ b/pgsql/tables/llx_c_ecotaxe.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2007 Régis Houssin --- --- $Id: llx_c_ecotaxe.sql,v 1.2 2007/09/01 15:03:40 hregis Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/pgsql/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 à la traduction et à la référence interne - "libelle" varchar(255), -- Description - "price" real(16,8), -- Montant HT - "organization" varchar(255), -- Organisme gérant le barème tarifaire - "fk_pays" integer NOT NULL, -- Pays correspondant - "active" smallint DEFAULT 1 NOT NULL +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2007 Régis Houssin +-- +-- 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_c_ecotaxe.sql,v 1.7 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + +create table llx_c_ecotaxe +( + rowid SERIAL PRIMARY KEY, + "code" varchar(64) UNIQUE NOT NULL, -- Code servant à la traduction et à la référence interne + "libelle" varchar(255), -- Description + "price" real(24,8), -- Montant HT + "organization" varchar(255), -- Organisme gérant le barème tarifaire + "fk_pays" integer NOT NULL, -- Pays correspondant + "active" smallint DEFAULT 1 NOT NULL ); \ No newline at end of file diff --git a/pgsql/tables/llx_c_effectif.sql b/pgsql/tables/llx_c_effectif.sql index 16dd84d1ebd..ce007932457 100644 --- a/pgsql/tables/llx_c_effectif.sql +++ b/pgsql/tables/llx_c_effectif.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_effectif -( - id integer PRIMARY KEY, - "code" varchar(12) UNIQUE NOT NULL, - "libelle" varchar(30), - "active" smallint DEFAULT 1 NOT NULL -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_effectif.sql,v 1.6 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + +create table llx_c_effectif +( + id integer PRIMARY KEY, + "code" varchar(12) UNIQUE NOT NULL, + "libelle" varchar(30), + "active" smallint DEFAULT 1 NOT NULL +); + diff --git a/pgsql/tables/llx_c_forme_juridique.sql b/pgsql/tables/llx_c_forme_juridique.sql index 707e1c75d7a..13b537f907b 100644 --- a/pgsql/tables/llx_c_forme_juridique.sql +++ b/pgsql/tables/llx_c_forme_juridique.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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_c_forme_juridique -( - rowid SERIAL PRIMARY KEY, - "code" varchar(12) UNIQUE NOT NULL, - "fk_pays" integer NOT NULL, - "libelle" varchar(255), - "active" smallint DEFAULT 1 NOT NULL -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_forme_juridique.sql,v 1.8 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + + +create table llx_c_forme_juridique +( + rowid SERIAL PRIMARY KEY, + "code" varchar(12) UNIQUE NOT NULL, + "fk_pays" integer NOT NULL, + "libelle" varchar(255), + "active" smallint DEFAULT 1 NOT NULL +); + diff --git a/pgsql/tables/llx_c_methode_commande_fournisseur.sql b/pgsql/tables/llx_c_methode_commande_fournisseur.sql index 6c5470f874e..cb8b76e4a09 100644 --- a/pgsql/tables/llx_c_methode_commande_fournisseur.sql +++ b/pgsql/tables/llx_c_methode_commande_fournisseur.sql @@ -1,39 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2004-2005 Rodolphe Quiedeville --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_methode_commande_fournisseur -( - rowid SERIAL PRIMARY KEY, - "code" varchar(30), - "libelle" varchar(60), - "active" smallint default 1 NOT NULL, - UNIQUE(code) -); - -CREATE INDEX idx_llx_c_methode_commande_fournisseur_code ON llx_c_methode_commande_fournisseur (code); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2004-2005 Rodolphe Quiedeville +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_c_methode_commande_fournisseur.sql,v 1.5 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + + +create table llx_c_methode_commande_fournisseur +( + rowid SERIAL PRIMARY KEY, + "code" varchar(30), + "libelle" varchar(60), + "active" smallint default 1 NOT NULL, + UNIQUE(code) +); + +CREATE INDEX idx_llx_c_methode_commande_fournisseur_code ON llx_c_methode_commande_fournisseur (code); + diff --git a/pgsql/tables/llx_c_paiement.sql b/pgsql/tables/llx_c_paiement.sql index 2d741dd8aeb..1ccf37ae136 100644 --- a/pgsql/tables/llx_c_paiement.sql +++ b/pgsql/tables/llx_c_paiement.sql @@ -1,44 +1,43 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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$ --- --- ======================================================================== --- --- Type : --- --- 0 : entrée d'argent --- 1 : sortie d'argent --- 2 : entrée ou sortie d'argent - -create table llx_c_paiement -( - id integer PRIMARY KEY, - "code" varchar(6) UNIQUE NOT NULL, - "libelle" varchar(30), - "type" smallint, - "active" smallint DEFAULT 1 NOT NULL -); - - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_paiement.sql,v 1.8 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + + +-- Type : +-- +-- 0 : entrée d'argent +-- 1 : sortie d'argent +-- 2 : entrée ou sortie d'argent + +create table llx_c_paiement +( + id integer PRIMARY KEY, + "code" varchar(6) UNIQUE NOT NULL, + "libelle" varchar(30), + "type" smallint, + "active" smallint DEFAULT 1 NOT NULL +); + + + diff --git a/pgsql/tables/llx_c_pays.key.sql b/pgsql/tables/llx_c_pays.key.sql index 2682ab572a2..58febd17d54 100644 --- a/pgsql/tables/llx_c_pays.key.sql +++ b/pgsql/tables/llx_c_pays.key.sql @@ -1,30 +1,28 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_c_pays ADD UNIQUE INDEX idx_c_pays_code (code); -ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_pays_code_iso (code_iso); -ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_pays_libelle (libelle); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_c_pays.key.sql,v 1.2 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + + +ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_pays_code (code); +ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_pays_code_iso (code_iso); +ALTER TABLE llx_c_pays ADD UNIQUE INDEX idx_c_pays_libelle (libelle); diff --git a/pgsql/tables/llx_c_pays.sql b/pgsql/tables/llx_c_pays.sql index 94889fb7cab..036279ab431 100644 --- a/pgsql/tables/llx_c_pays.sql +++ b/pgsql/tables/llx_c_pays.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_pays -( - rowid integer PRIMARY KEY, - "code" varchar(2) NOT NULL, - "code_iso" varchar(3) , - "libelle" varchar(50) NOT NULL, - "active" smallint DEFAULT 1 NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_pays.sql,v 1.12 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + +create table llx_c_pays +( + rowid integer PRIMARY KEY, + "code" varchar(2) NOT NULL, + "code_iso" varchar(3) , + "libelle" varchar(50) NOT NULL, + "active" smallint DEFAULT 1 NOT NULL +); diff --git a/pgsql/tables/llx_c_propalst.sql b/pgsql/tables/llx_c_propalst.sql index 4f325b77cf5..4a0d5ea5dc5 100644 --- a/pgsql/tables/llx_c_propalst.sql +++ b/pgsql/tables/llx_c_propalst.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_propalst -( - id smallint PRIMARY KEY, - "code" varchar(12) UNIQUE NOT NULL, - "label" varchar(30), - "active" smallint DEFAULT 1 NOT NULL -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_propalst.sql,v 1.6 2007/12/02 21:57:09 eldy Exp +-- =================================================================== + +create table llx_c_propalst +( + id smallint PRIMARY KEY, + "code" varchar(12) UNIQUE NOT NULL, + "label" varchar(30), + "active" smallint DEFAULT 1 NOT NULL +); + diff --git a/pgsql/tables/llx_c_regions.key.sql b/pgsql/tables/llx_c_regions.key.sql index edc91a35f7d..437c1e332bf 100644 --- a/pgsql/tables/llx_c_regions.key.sql +++ b/pgsql/tables/llx_c_regions.key.sql @@ -1,29 +1,27 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_c_regions ADD INDEX idx_c_regions_fk_pays (fk_pays); -ALTER TABLE llx_c_regions ADD CONSTRAINT fk_c_regions_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_pays (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_c_regions.key.sql,v 1.4 2007/12/02 21:57:09 eldy Exp +-- ======================================================================== + + +ALTER TABLE llx_c_regions ADD INDEX idx_c_regions_fk_pays (fk_pays); +ALTER TABLE llx_c_regions ADD CONSTRAINT fk_c_regions_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_pays (rowid); diff --git a/pgsql/tables/llx_c_regions.sql b/pgsql/tables/llx_c_regions.sql index 9edaa4da125..44e2633bea9 100644 --- a/pgsql/tables/llx_c_regions.sql +++ b/pgsql/tables/llx_c_regions.sql @@ -1,38 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_regions -( - rowid SERIAL PRIMARY KEY, - "code_region" integer UNIQUE NOT NULL, - "fk_pays" integer NOT NULL, - "cheflieu" varchar(7), - "tncc" integer, - "nom" varchar(50), - "active" smallint DEFAULT 1 NOT NULL -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_regions.sql,v 1.11 2007/12/02 21:57:10 eldy Exp +-- ======================================================================== + +create table llx_c_regions +( + rowid SERIAL PRIMARY KEY, + "code_region" integer UNIQUE NOT NULL, + "fk_pays" integer NOT NULL, + "cheflieu" varchar(7), + "tncc" integer, + "nom" varchar(50), + "active" smallint DEFAULT 1 NOT NULL +); + diff --git a/pgsql/tables/llx_c_stcomm.sql b/pgsql/tables/llx_c_stcomm.sql index 22caa785033..015fdc4ef17 100644 --- a/pgsql/tables/llx_c_stcomm.sql +++ b/pgsql/tables/llx_c_stcomm.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_stcomm -( - id integer PRIMARY KEY, - "code" varchar(12) UNIQUE NOT NULL, - "libelle" varchar(30), - "active" smallint default 1 NOT NULL -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_stcomm.sql,v 1.6 2007/12/02 21:57:10 eldy Exp +-- ======================================================================== + +create table llx_c_stcomm +( + id integer PRIMARY KEY, + "code" varchar(12) UNIQUE NOT NULL, + "libelle" varchar(30), + "active" smallint default 1 NOT NULL +); + diff --git a/pgsql/tables/llx_c_tva.sql b/pgsql/tables/llx_c_tva.sql index a3eff5ef3a2..9162a4acba5 100644 --- a/pgsql/tables/llx_c_tva.sql +++ b/pgsql/tables/llx_c_tva.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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_tva -( - rowid SERIAL PRIMARY KEY, - "fk_pays" integer NOT NULL, - "taux" real NOT NULL, - "recuperableonly" integer NOT NULL DEFAULT 0, - "note" varchar(128), - "active" smallint DEFAULT 1 NOT NULL -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_c_tva.sql,v 1.3 2007/12/02 21:57:10 eldy Exp +-- ======================================================================== + + +create table llx_c_tva +( + rowid SERIAL PRIMARY KEY, + "fk_pays" integer NOT NULL, + "taux" real NOT NULL, + "recuperableonly" integer NOT NULL DEFAULT 0, + "note" varchar(128), + "active" smallint DEFAULT 1 NOT NULL +); + diff --git a/pgsql/tables/llx_c_type_contact.key.sql b/pgsql/tables/llx_c_type_contact.key.sql index 8cebdee3acb..135b71e06a2 100644 --- a/pgsql/tables/llx_c_type_contact.key.sql +++ b/pgsql/tables/llx_c_type_contact.key.sql @@ -1,39 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Patrick Rouillon --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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. --- --- Defini les types de contact d'un element sert de reference pour --- la table llx_element_contact --- --- element est le nom de la table utilisant le type de contact. --- i.e. contact, facture, projet, societe (sans le llx_ devant). --- Libelle est un texte décrivant le type de contact. --- active précide si cette valeur est active ou 'archivé'. --- --- ======================================================================== - - -ALTER TABLE llx_c_type_contact - ADD UNIQUE INDEX idx_c_type_contact_uk (element, source, code); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Patrick Rouillon +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_c_type_contact.key.sql,v 1.3 2007/12/02 21:57:10 eldy Exp +-- ======================================================================== +-- Defini les types de contact d'un element sert de reference pour +-- la table llx_element_contact +-- +-- element est le nom de la table utilisant le type de contact. +-- i.e. contact, facture, projet, societe (sans le llx_ devant). +-- Libelle est un texte décrivant le type de contact. +-- active précide si cette valeur est active ou 'archivé'. + + + +ALTER TABLE llx_c_type_contact + ADD UNIQUE INDEX idx_c_type_contact_uk (element, source, code); + diff --git a/pgsql/tables/llx_c_type_contact.sql b/pgsql/tables/llx_c_type_contact.sql index d0843009792..cf17c5f4810 100644 --- a/pgsql/tables/llx_c_type_contact.sql +++ b/pgsql/tables/llx_c_type_contact.sql @@ -1,45 +1,43 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Patrick Rouillon --- Copyright (C) 2005 Laurent Destailleur --- --- $Id$ --- $Source$ --- --- 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. --- --- Defini les types de contact d'un element sert de reference pour --- la table llx_element_contact --- --- element est le nom de la table utilisant le type de contact. --- i.e. contact, facture, projet, societe (sans le llx_ devant). --- Libelle est un texte décrivant le type de contact. --- active précide si cette valeur est active ou 'archivé'. --- --- ======================================================================== - - -create table llx_c_type_contact -( - rowid integer PRIMARY KEY, - "element" varchar(30) NOT NULL, - "source" varchar(8) DEFAULT 'external' NOT NULL, - "code" varchar(16) NOT NULL, - "libelle" varchar(64) NOT NULL, - "active" smallint DEFAULT 1 NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Patrick Rouillon +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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. +-- +-- Defini les types de contact d'un element sert de reference pour +-- la table llx_element_contact +-- +-- element est le nom de la table utilisant le type de contact. +-- i.e. contact, facture, projet, societe (sans le llx_ devant). +-- Libelle est un texte décrivant le type de contact. +-- active précide si cette valeur est active ou 'archivé'. +-- +-- Id: llx_c_type_contact.sql,v 1.5 2007/12/02 21:57:10 eldy Exp +-- ======================================================================== + + +create table llx_c_type_contact +( + rowid integer PRIMARY KEY, + "element" varchar(30) NOT NULL, + "source" varchar(8) DEFAULT 'external' NOT NULL, + "code" varchar(16) NOT NULL, + "libelle" varchar(64) NOT NULL, + "active" smallint DEFAULT 1 NOT NULL +); diff --git a/pgsql/tables/llx_c_typent.sql b/pgsql/tables/llx_c_typent.sql index 445f2589cd1..1d1ac5e50ee 100644 --- a/pgsql/tables/llx_c_typent.sql +++ b/pgsql/tables/llx_c_typent.sql @@ -1,34 +1,42 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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_c_typent -( - id integer PRIMARY KEY, - "code" varchar(12) UNIQUE NOT NULL, - "libelle" varchar(30), - "active" smallint DEFAULT 1 NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_c_typent.sql,v 1.6 2007/12/02 21:57:10 eldy Exp +-- ======================================================================== + +CREATE TABLE llx_surveys_answers_summary ( + fk_question integer PRIMARY KEY, + "nb_rep1" decimal(10,0) NOT NULL default '0', + "nb_rep2" decimal(10,0) default NULL, + "nb_rep3" decimal(10,0) default NULL, + "nb_rep4" decimal(10,0) default NULL, + "tot_rep1" decimal(10,0) NOT NULL default '0', + "tot_rep2" decimal(10,0) default NULL, + "tot_rep3" decimal(10,0) default NULL, + "tot_rep4" decimal(10,0) default NULL +")""create" table llx_c_typent +( + id integer PRIMARY KEY, + "code" varchar(12) UNIQUE NOT NULL, + "libelle" varchar(30), + "active" smallint DEFAULT 1 NOT NULL +); diff --git a/pgsql/tables/llx_categorie.key.sql b/pgsql/tables/llx_categorie.key.sql index 3589642828f..aae398c0f14 100644 --- a/pgsql/tables/llx_categorie.key.sql +++ b/pgsql/tables/llx_categorie.key.sql @@ -1,24 +1,25 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2007 Laurent Destailleur --- --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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.key.sql,v 1.4 2007/12/02 22:03:22 eldy Exp +-- ============================================================================ + +ALTER TABLE llx_categorie ADD UNIQUE INDEX uk_categorie_ref (label,type); diff --git a/pgsql/tables/llx_categorie.sql b/pgsql/tables/llx_categorie.sql index 2fd1b23ea6c..94aa1042664 100644 --- a/pgsql/tables/llx_categorie.sql +++ b/pgsql/tables/llx_categorie.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Brice Davoleau --- Copyright (C) 2005 Matthieu Valleton --- Copyright (C) 2005-2006 Regis Houssin --- --- 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_categorie -( - rowid SERIAL PRIMARY KEY, - "label" VARCHAR(255), -- nom de la catégorie - "description" text, -- description de la catégorie - "visible" smallint DEFAULT 1 NOT NULL, -- determine si les produits sont visible ou pas - "type" smallint DEFAULT 1 NOT NULL -- Type de catégorie (product, supplier, societe) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- Copyright (C) 2005-2006 Regis Houssin +-- +-- 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.sql,v 1.6 2007/12/02 22:03:22 eldy Exp +-- ============================================================================ + +create table llx_categorie +( + rowid SERIAL PRIMARY KEY, + "label" VARCHAR(255), -- nom de la catégorie + "description" text, -- description de la catégorie + "visible" smallint DEFAULT 1 NOT NULL, -- determine si les produits sont visible ou pas + "type" smallint DEFAULT 1 NOT NULL -- Type de catégorie (product, supplier, societe) +); diff --git a/pgsql/tables/llx_categorie_association.key.sql b/pgsql/tables/llx_categorie_association.key.sql index e67d64148b3..448f7a17184 100644 --- a/pgsql/tables/llx_categorie_association.key.sql +++ b/pgsql/tables/llx_categorie_association.key.sql @@ -1,31 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Brice Davoleau --- Copyright (C) 2005 Matthieu Valleton --- Copyright (C) 2005 Laurent Destailleur --- --- 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_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 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_association.key.sql,v 1.4 2007/12/02 22:03:22 eldy Exp +-- ============================================================================ + + +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 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); diff --git a/pgsql/tables/llx_categorie_association.sql b/pgsql/tables/llx_categorie_association.sql index 65b6a1e013c..8869a136c5f 100644 --- a/pgsql/tables/llx_categorie_association.sql +++ b/pgsql/tables/llx_categorie_association.sql @@ -1,29 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Brice Davoleau --- Copyright (C) 2005 Matthieu Valleton --- --- 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_association -( - "fk_categorie_mere" integer NOT NULL, - "fk_categorie_fille" integer NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- +-- 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_association.sql,v 1.2 2007/12/02 22:03:22 eldy Exp +-- ============================================================================ + +create table llx_categorie_association +( + "fk_categorie_mere" integer NOT NULL, + "fk_categorie_fille" integer NOT NULL +); diff --git a/pgsql/tables/llx_categorie_fournisseur.sql b/pgsql/tables/llx_categorie_fournisseur.sql index e5ae18d7ad9..cd406fccf9c 100644 --- a/pgsql/tables/llx_categorie_fournisseur.sql +++ b/pgsql/tables/llx_categorie_fournisseur.sql @@ -1,34 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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.3 2007/12/02 22:03:22 eldy Exp +-- ============================================================================ + +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); diff --git a/pgsql/tables/llx_categorie_product.key.sql b/pgsql/tables/llx_categorie_product.key.sql index 8e88b54f122..6786d9196e8 100644 --- a/pgsql/tables/llx_categorie_product.key.sql +++ b/pgsql/tables/llx_categorie_product.key.sql @@ -1,31 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Brice Davoleau --- Copyright (C) 2005 Matthieu Valleton --- Copyright (C) 2005 Laurent Destailleur --- --- 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_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_product (fk_product); - -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 CONSTRAINT fk_categorie_product_product_rowid FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_product.key.sql,v 1.4 2007/12/02 22:03:22 eldy Exp +-- ============================================================================ + +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_product (fk_product); + +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 CONSTRAINT fk_categorie_product_product_rowid FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); diff --git a/pgsql/tables/llx_categorie_product.sql b/pgsql/tables/llx_categorie_product.sql index 22f05737d53..c750093764c 100644 --- a/pgsql/tables/llx_categorie_product.sql +++ b/pgsql/tables/llx_categorie_product.sql @@ -1,29 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Brice Davoleau --- Copyright (C) 2005 Matthieu Valleton --- --- 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_product -( - "fk_categorie" integer NOT NULL, - "fk_product" integer NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Brice Davoleau +-- Copyright (C) 2005 Matthieu Valleton +-- +-- 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_product.sql,v 1.2 2007/12/02 22:03:22 eldy Exp +-- ============================================================================ + +create table llx_categorie_product +( + "fk_categorie" integer NOT NULL, + "fk_product" integer NOT NULL +); diff --git a/pgsql/tables/llx_categorie_societe.key.sql b/pgsql/tables/llx_categorie_societe.key.sql index 139e8daf8d0..b4caf62f42d 100644 --- a/pgsql/tables/llx_categorie_societe.key.sql +++ b/pgsql/tables/llx_categorie_societe.key.sql @@ -1,29 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2007 Patrick Raguin --- --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2007 Patrick Raguin +-- +-- 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_compta.sql,v 1.4 2004/10/09 10:47:16 opensides Exp +-- ============================================================================ + +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); diff --git a/pgsql/tables/llx_categorie_societe.sql b/pgsql/tables/llx_categorie_societe.sql index 2d56b7ff93b..e8b54d92afa 100644 --- a/pgsql/tables/llx_categorie_societe.sql +++ b/pgsql/tables/llx_categorie_societe.sql @@ -1,28 +1,29 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2007 Patrick Raguin --- --- 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 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2007 Patrick Raguin +-- +-- 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_compta.sql,v 1.4 2004/10/09 10:47:16 opensides Exp +-- ============================================================================ + +create table llx_categorie_societe +( + "fk_categorie" integer NOT NULL, + "fk_societe" integer NOT NULL +); diff --git a/pgsql/tables/llx_chargesociales.sql b/pgsql/tables/llx_chargesociales.sql index 71d50dad0ec..9c05d92494c 100644 --- a/pgsql/tables/llx_chargesociales.sql +++ b/pgsql/tables/llx_chargesociales.sql @@ -1,39 +1,39 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2001-2002 Rodolphe Quiedeville --- --- 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_chargesociales -( - rowid SERIAL PRIMARY KEY, - "date_ech" timestamp, -- date d'echeance - "libelle" varchar(80), - "fk_type" integer, - "amount" real default 0 NOT NULL, - "paye" smallint default 0 NOT NULL, - "periode" date -); - - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- +-- 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_chargesociales.sql,v 1.7 2007/11/27 05:20:53 eldy Exp +-- $Source$ +-- +-- ======================================================================== + +create table llx_chargesociales +( + rowid SERIAL PRIMARY KEY, + "date_ech" timestamp, -- date d'echeance + "libelle" varchar(80) NOT NULL, + "fk_type" integer NOT NULL, + "amount" real default 0 NOT NULL, + "paye" smallint default 0 NOT NULL, + "periode" date +); + + + diff --git a/pgsql/tables/llx_co_fa.sql b/pgsql/tables/llx_co_fa.sql index d41490632d1..434996755ac 100644 --- a/pgsql/tables/llx_co_fa.sql +++ b/pgsql/tables/llx_co_fa.sql @@ -1,35 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_co_fa -( - rowid SERIAL PRIMARY KEY, - "fk_commande" integer NOT NULL, - "fk_facture" integer NOT NULL -); - -CREATE INDEX idx_llx_co_fa_fk_commande ON llx_co_fa (fk_commande); -CREATE INDEX idx_llx_co_fa_fk_facture ON llx_co_fa (fk_facture); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_co_fa.sql,v 1.3 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + + +create table llx_co_fa +( + rowid SERIAL PRIMARY KEY, + "fk_commande" integer NOT NULL, + "fk_facture" integer NOT NULL +); + +CREATE INDEX idx_llx_co_fa_fk_commande ON llx_co_fa (fk_commande); +CREATE INDEX idx_llx_co_fa_fk_facture ON llx_co_fa (fk_facture); diff --git a/pgsql/tables/llx_co_pr.sql b/pgsql/tables/llx_co_pr.sql index e7ebfbc928f..2e2b929dc15 100644 --- a/pgsql/tables/llx_co_pr.sql +++ b/pgsql/tables/llx_co_pr.sql @@ -1,31 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_co_pr -( - rowid SERIAL PRIMARY KEY, - "fk_commande" integer, - "fk_propale" integer -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_co_pr.sql,v 1.3 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + +create table llx_co_pr +( + rowid SERIAL PRIMARY KEY, + "fk_commande" integer, + "fk_propale" integer +); diff --git a/pgsql/tables/llx_comfourn_facfourn.sql b/pgsql/tables/llx_comfourn_facfourn.sql index b1ebc851f1e..30ccc2da113 100644 --- a/pgsql/tables/llx_comfourn_facfourn.sql +++ b/pgsql/tables/llx_comfourn_facfourn.sql @@ -1,36 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2005-2006 Regis Houssin --- --- 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_comfourn_facfourn -( - rowid SERIAL PRIMARY KEY, - "fk_commande" integer NOT NULL, - "fk_facture" integer NOT NULL -); - -CREATE INDEX idx_llx_comfourn_facfourn_fk_commande ON llx_comfourn_facfourn (fk_commande); -CREATE INDEX idx_llx_comfourn_facfourn_fk_facture ON llx_comfourn_facfourn (fk_facture); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2005-2006 Regis Houssin +-- +-- 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_comfourn_facfourn.sql,v 1.3 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + + +create table llx_comfourn_facfourn +( + rowid SERIAL PRIMARY KEY, + "fk_commande" integer NOT NULL, + "fk_facture" integer NOT NULL +); + +CREATE INDEX idx_llx_comfourn_facfourn_fk_commande ON llx_comfourn_facfourn (fk_commande); +CREATE INDEX idx_llx_comfourn_facfourn_fk_facture ON llx_comfourn_facfourn (fk_facture); diff --git a/pgsql/tables/llx_commande.key.sql b/pgsql/tables/llx_commande.key.sql index cc1df73908b..d3c7f3cb1c8 100644 --- a/pgsql/tables/llx_commande.key.sql +++ b/pgsql/tables/llx_commande.key.sql @@ -1,32 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - --- Supprimme orphelins pour permettre montée de la clé --- 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 CONSTRAINT fk_commande_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006 Laurent Destailleur +-- +-- 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.key.sql,v 1.3 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + + +-- Supprimme orphelins pour permettre montée de la clé +-- 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 CONSTRAINT fk_commande_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); diff --git a/pgsql/tables/llx_commande.sql b/pgsql/tables/llx_commande.sql index aedf6d7b58a..c63784c1fbe 100644 --- a/pgsql/tables/llx_commande.sql +++ b/pgsql/tables/llx_commande.sql @@ -1,65 +1,63 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_commande -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "fk_soc" integer NOT NULL, - "fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande - "ref" varchar(30) NOT NULL, -- order number - "ref_client" varchar(30), -- customer order number - "date_creation" timestamp, -- date de creation - "date_valid" timestamp, -- date de validation - "date_cloture" timestamp, -- date de cloture - "date_commande" date, -- date de la commande - "fk_user_author" integer, -- createur de la commande - "fk_user_valid" integer, -- valideur de la commande - "fk_user_cloture" integer, -- auteur cloture - "source" smallint NOT NULL, - "fk_statut" smallint default 0, - "amount_ht" real default 0, - "remise_percent" real default 0, - "remise_absolue" real default 0, - "remise" real default 0, - "tva" real(16,8) default 0, - "total_ht" real(16,8) default 0, - "total_ttc" real(16,8) default 0, - "note" text, - "note_public" text, - "model_pdf" varchar(50), - "facture" smallint default 0, - "fk_cond_reglement" integer, -- condition de réglement - "fk_mode_reglement" integer, -- mode de réglement - "date_livraison" date default NULL, - "fk_adresse_livraison" integer, -- adresse de livraison - UNIQUE(ref) -); - -CREATE INDEX idx_llx_commande_ref ON llx_commande (ref); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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.sql,v 1.15 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + + + + +create table llx_commande +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "fk_soc" integer NOT NULL, + "fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande + "ref" varchar(30) NOT NULL, -- order number + "ref_client" varchar(30), -- customer order number + "date_creation" timestamp, -- date de creation + "date_valid" timestamp, -- date de validation + "date_cloture" timestamp, -- date de cloture + "date_commande" date, -- date de la commande + "fk_user_author" integer, -- createur de la commande + "fk_user_valid" integer, -- valideur de la commande + "fk_user_cloture" integer, -- auteur cloture + "source" smallint NOT NULL, + "fk_statut" smallint default 0, + "amount_ht" real default 0, + "remise_percent" real default 0, + "remise_absolue" real default 0, + "remise" real default 0, + "tva" real(24,8) default 0, + "total_ht" real(24,8) default 0, + "total_ttc" real(24,8) default 0, + "note" text, + "note_public" text, + "model_pdf" varchar(50), + "facture" smallint default 0, + "fk_cond_reglement" integer, -- condition de réglement + "fk_mode_reglement" integer, -- mode de réglement + "date_livraison" date default NULL, + "fk_adresse_livraison" integer, -- adresse de livraison + UNIQUE(ref) +); + +CREATE INDEX idx_llx_commande_ref ON llx_commande (ref); diff --git a/pgsql/tables/llx_commande_fournisseur.key.sql b/pgsql/tables/llx_commande_fournisseur.key.sql index 30e1c1282a1..e77a0a6fdfd 100644 --- a/pgsql/tables/llx_commande_fournisseur.key.sql +++ b/pgsql/tables/llx_commande_fournisseur.key.sql @@ -1,34 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006-2007 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - --- Supprimme orphelins pour permettre montée de la clé --- 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 CONSTRAINT fk_commande_fournisseur_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006-2007 Laurent Destailleur +-- +-- 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.key.sql,v 1.4 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + + +-- Supprimme orphelins pour permettre montée de la clé +-- 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 CONSTRAINT fk_commande_fournisseur_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); diff --git a/pgsql/tables/llx_commande_fournisseur.sql b/pgsql/tables/llx_commande_fournisseur.sql index 86c954bb781..34ca707b5ad 100644 --- a/pgsql/tables/llx_commande_fournisseur.sql +++ b/pgsql/tables/llx_commande_fournisseur.sql @@ -1,56 +1,54 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville --- Copyright (C) 2007 Laurent Destailleur --- --- 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_commande_fournisseur -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "fk_soc" integer NOT NULL, - "fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande - "ref" varchar(30) NOT NULL, -- order number - "date_creation" timestamp, -- date de creation - "date_valid" timestamp, -- date de validation - "date_cloture" timestamp, -- date de cloture - "date_commande" date, -- date de la commande - "fk_user_author" integer, -- createur de la commande - "fk_user_valid" integer, -- valideur de la commande - "fk_user_cloture" integer, -- auteur cloture - "source" smallint NOT NULL, - "fk_statut" smallint default 0, - "amount_ht" real default 0, - "remise_percent" real default 0, - "remise" real default 0, - "tva" real(16,8) default 0, - "total_ht" real(16,8) default 0, - "total_ttc" real(16,8) default 0, - "note" text, - "note_public" text, - "model_pdf" varchar(50), - "fk_methode_commande" integer default 0 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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.sql,v 1.8 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + + + +create table llx_commande_fournisseur +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "fk_soc" integer NOT NULL, + "fk_projet" integer DEFAULT 0, -- projet auquel est rattache la commande + "ref" varchar(30) NOT NULL, -- order number + "date_creation" timestamp, -- date de creation + "date_valid" timestamp, -- date de validation + "date_cloture" timestamp, -- date de cloture + "date_commande" date, -- date de la commande + "fk_user_author" integer, -- createur de la commande + "fk_user_valid" integer, -- valideur de la commande + "fk_user_cloture" integer, -- auteur cloture + "source" smallint NOT NULL, + "fk_statut" smallint default 0, + "amount_ht" real default 0, + "remise_percent" real default 0, + "remise" real default 0, + "tva" real(24,8) default 0, + "total_ht" real(24,8) default 0, + "total_ttc" real(24,8) default 0, + "note" text, + "note_public" text, + "model_pdf" varchar(50), + "fk_methode_commande" integer default 0 +); diff --git a/pgsql/tables/llx_commande_fournisseur_dispatch.key.sql b/pgsql/tables/llx_commande_fournisseur_dispatch.key.sql index 30f73f1c5b0..7ea47e92eaf 100644 --- a/pgsql/tables/llx_commande_fournisseur_dispatch.key.sql +++ b/pgsql/tables/llx_commande_fournisseur_dispatch.key.sql @@ -1,26 +1,25 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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 $ --- =================================================================== - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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.2 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX (fk_commande); \ No newline at end of file diff --git a/pgsql/tables/llx_commande_fournisseur_dispatch.sql b/pgsql/tables/llx_commande_fournisseur_dispatch.sql index eca7009ec11..4b2a0875c45 100644 --- a/pgsql/tables/llx_commande_fournisseur_dispatch.sql +++ b/pgsql/tables/llx_commande_fournisseur_dispatch.sql @@ -1,35 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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é - "fk_entrepot" integer, - "fk_user" integer, - "datec" timestamp -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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.2 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + +create table llx_commande_fournisseur_dispatch +( + rowid SERIAL PRIMARY KEY, + "fk_commande" integer, + "fk_product" integer, + "qty" float, -- quantité + "fk_entrepot" integer, + "fk_user" integer, + "datec" timestamp +); diff --git a/pgsql/tables/llx_commande_fournisseur_log.sql b/pgsql/tables/llx_commande_fournisseur_log.sql index 122fdfcd8de..1c5ed30e497 100644 --- a/pgsql/tables/llx_commande_fournisseur_log.sql +++ b/pgsql/tables/llx_commande_fournisseur_log.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville --- --- 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_commande_fournisseur_log -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "datelog" timestamp, - "fk_commande" integer NOT NULL, - "fk_statut" smallint NOT NULL, - "fk_user" integer NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- 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_log.sql,v 1.2 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + +create table llx_commande_fournisseur_log +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "datelog" timestamp, + "fk_commande" integer NOT NULL, + "fk_statut" smallint NOT NULL, + "fk_user" integer NOT NULL +); diff --git a/pgsql/tables/llx_commande_fournisseurdet.sql b/pgsql/tables/llx_commande_fournisseurdet.sql index e930ca6c661..415485e64c5 100644 --- a/pgsql/tables/llx_commande_fournisseurdet.sql +++ b/pgsql/tables/llx_commande_fournisseurdet.sql @@ -1,45 +1,44 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2007 Rodolphe Quiedeville --- Copyright (C) 2007 Laurent Destailleur --- --- 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_commande_fournisseurdet -( - rowid SERIAL PRIMARY KEY, - "fk_commande" integer, - "fk_product" integer, - "ref" varchar(50), - "label" varchar(255), - "description" text, - "tva_tx" real(6,3), -- taux tva - "qty" real, -- quantité - "remise_percent" real DEFAULT 0, -- pourcentage de remise - "remise" real DEFAULT 0, -- montant de la remise - "price" real, -- prix final - "subprice" real(16,8), -- prix unitaire - "total_ht" real(16,8), -- Total HT de la ligne toute quantité et incluant remise ligne et globale - "total_tva" real(16,8), -- Total TVA de la ligne toute quantité et incluant remise ligne et globale - "total_ttc" real(16,8), -- Total TTC de la ligne toute quantité et incluant remise ligne et globale - "info_bits" integer DEFAULT 0 -- TVA NPR ou non -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2007 Rodolphe Quiedeville +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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_fournisseurdet.sql,v 1.8 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + +create table llx_commande_fournisseurdet +( + rowid SERIAL PRIMARY KEY, + "fk_commande" integer NOT NULL, + "fk_product" integer NOT NULL, + "ref" varchar(50), + "label" varchar(255), + "description" text, + "tva_tx" real(6,3) DEFAULT 0, -- taux tva + "qty" real, -- quantité + "remise_percent" real DEFAULT 0, -- pourcentage de remise + "remise" real DEFAULT 0, -- montant de la remise + "price" real, -- prix final + "subprice" real(24,8) DEFAULT 0, -- prix unitaire + "total_ht" real(24,8) DEFAULT 0, -- Total HT de la ligne toute quantité et incluant remise ligne et globale + "total_tva" real(24,8) DEFAULT 0, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale + "total_ttc" real(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale + "info_bits" integer DEFAULT 0 -- TVA NPR ou non +); diff --git a/pgsql/tables/llx_commandedet.key.sql b/pgsql/tables/llx_commandedet.key.sql index 42f52a2a32b..e5cfbb2ed91 100644 --- a/pgsql/tables/llx_commandedet.key.sql +++ b/pgsql/tables/llx_commandedet.key.sql @@ -1,31 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2006 Laurent Destailleur --- --- 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ée de la clé --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2006 Laurent Destailleur +-- +-- 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.3 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + + +-- Supprimme orhpelins pour permettre montée de la clé +-- 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); diff --git a/pgsql/tables/llx_commandedet.sql b/pgsql/tables/llx_commandedet.sql index d19e87c491d..38cabd24d20 100644 --- a/pgsql/tables/llx_commandedet.sql +++ b/pgsql/tables/llx_commandedet.sql @@ -1,54 +1,54 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2006-2007 Laurent Destailleur --- --- 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_commandedet -( - rowid SERIAL PRIMARY KEY, - "fk_commande" integer, - "fk_product" integer, - "description" text, - "tva_tx" real(6,3), -- taux tva - "qty" real, -- quantité - "remise_percent" real DEFAULT 0, -- pourcentage de remise - "remise" real DEFAULT 0, -- montant de la remise - "fk_remise_except" integer NULL, -- Lien vers table des remises fixes - "price" real, -- prix final - "subprice" real(16,8), -- prix unitaire - "total_ht" real(16,8), -- Total HT de la ligne toute quantité et incluant remise ligne et globale - "total_tva" real(16,8), -- Total TVA de la ligne toute quantité et incluant remise ligne et globale - "total_ttc" real(16,8), -- Total TTC de la ligne toute quantité et incluant remise ligne et globale - "info_bits" integer DEFAULT 0, -- TVA NPR ou non - "marge_tx" real, -- taux de marge (marge sur prix d'achat) - "marque_tx" real, -- taux de marque (marge sur prix de vente) - "special_code" int2 DEFAULT 0, -- code pour les lignes speciales - "rang" integer DEFAULT 0 -); - --- --- Liste des codes pour special_code --- --- 1 : frais de port +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2006-2007 Laurent Destailleur +-- +-- 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.sql,v 1.15 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + +create table llx_commandedet +( + rowid SERIAL PRIMARY KEY, + "fk_commande" integer, + "fk_product" integer, + "description" text, + "tva_tx" real(6,3), -- taux tva + "qty" real, -- quantité + "remise_percent" real DEFAULT 0, -- pourcentage de remise + "remise" real DEFAULT 0, -- montant de la remise + "fk_remise_except" integer NULL, -- Lien vers table des remises fixes + "price" real, -- prix final + "subprice" real(24,8) DEFAULT 0, -- prix unitaire + "total_ht" real(24,8) DEFAULT 0, -- Total HT de la ligne toute quantité et incluant remise ligne et globale + "total_tva" real(24,8) DEFAULT 0, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale + "total_ttc" real(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale + "info_bits" integer DEFAULT 0, -- TVA NPR ou non + "marge_tx" real(6,3) DEFAULT 0, -- taux de marge (marge sur prix d'achat) + "marque_tx" real(6,3) DEFAULT 0, -- taux de marque (marge sur prix de vente) + "special_code" int2 DEFAULT 0, -- code pour les lignes speciales + "rang" integer DEFAULT 0 +); + +-- +-- Liste des codes pour special_code +-- +-- 1 : frais de port +-- 2 : ecotaxe -- \ No newline at end of file diff --git a/pgsql/tables/llx_compta.sql b/pgsql/tables/llx_compta.sql index b5de8b70528..7f29ec698ed 100644 --- a/pgsql/tables/llx_compta.sql +++ b/pgsql/tables/llx_compta.sql @@ -1,40 +1,38 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2000-2002 Rodolphe Quiedeville --- --- $Id$ --- $Source$ --- --- 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_compta -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "datev" date, -- date de valeur - "amount" real DEFAULT 0 NOT NULL , - "label" varchar(255), - "fk_compta_account" integer, - "fk_user_author" integer, - "fk_user_valid" integer, - "valid" smallint DEFAULT 0, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2000-2002 Rodolphe Quiedeville +-- +-- 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_compta.sql,v 1.5 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + + +create table llx_compta +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "datev" date, -- date de valeur + "amount" real DEFAULT 0 NOT NULL , + "label" varchar(255), + "fk_compta_account" integer, + "fk_user_author" integer, + "fk_user_valid" integer, + "valid" smallint DEFAULT 0, + "note" text +); diff --git a/pgsql/tables/llx_compta_account.sql b/pgsql/tables/llx_compta_account.sql index 82403ed14a4..79d06d7d2da 100644 --- a/pgsql/tables/llx_compta_account.sql +++ b/pgsql/tables/llx_compta_account.sql @@ -1,36 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2000-2002 Rodolphe Quiedeville --- --- $Id$ --- $Source$ --- --- 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_compta_account -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "number" varchar(12), - "label" varchar(255), - "fk_user_author" integer, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2000-2002 Rodolphe Quiedeville +-- +-- Id: llx_compta_account.sql,v 1.4 2007/12/02 22:03:23 eldy Exp +-- $Source$ +-- +-- 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_compta_account.sql,v 1.4 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + + +create table llx_compta_account +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "number" varchar(12), + "label" varchar(255), + "fk_user_author" integer, + "note" text +); diff --git a/pgsql/tables/llx_compta_compte_generaux.sql b/pgsql/tables/llx_compta_compte_generaux.sql index bfb6b718879..5050b7d32f4 100644 --- a/pgsql/tables/llx_compta_compte_generaux.sql +++ b/pgsql/tables/llx_compta_compte_generaux.sql @@ -1,39 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville --- --- 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_compta_compte_generaux -( - rowid SERIAL PRIMARY KEY, - "date_creation" timestamp, - "numero" varchar(50), - "intitule" varchar(255), - "fk_user_author" integer, - "note" text, - UNIQUE(numero) -); - -CREATE INDEX idx_llx_compta_compte_generaux_numero ON llx_compta_compte_generaux (numero); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- 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_compta_compte_generaux.sql,v 1.3 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + + +create table llx_compta_compte_generaux +( + rowid SERIAL PRIMARY KEY, + "date_creation" timestamp, + "numero" varchar(50), + "intitule" varchar(255), + "fk_user_author" integer, + "note" text, + UNIQUE(numero) +); + +CREATE INDEX idx_llx_compta_compte_generaux_numero ON llx_compta_compte_generaux (numero); diff --git a/pgsql/tables/llx_cond_reglement.sql b/pgsql/tables/llx_cond_reglement.sql index e8319caf8e1..9ac70c9ce70 100644 --- a/pgsql/tables/llx_cond_reglement.sql +++ b/pgsql/tables/llx_cond_reglement.sql @@ -1,38 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2003 Rodolphe Quiedeville --- --- 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_cond_reglement -( - rowid integer PRIMARY KEY, - "code" varchar(16), - "sortorder" smallint, - "active" smallint DEFAULT 1, - "libelle" varchar(255), - "libelle_facture" text, - "fdm" smallint, -- reglement fin de mois - "nbjour" smallint, - "decalage" smallint -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- +-- 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_cond_reglement.sql,v 1.8 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + +create table llx_cond_reglement +( + rowid integer PRIMARY KEY, + "code" varchar(16), + "sortorder" smallint, + "active" smallint DEFAULT 1, + "libelle" varchar(255), + "libelle_facture" text, + "fdm" smallint, -- reglement fin de mois + "nbjour" smallint, + "decalage" smallint +); diff --git a/pgsql/tables/llx_const.sql b/pgsql/tables/llx_const.sql index 03fbd8ed91c..469faaa6e81 100644 --- a/pgsql/tables/llx_const.sql +++ b/pgsql/tables/llx_const.sql @@ -1,43 +1,42 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2001-2002 Rodolphe Quiedeville --- Copyright (C) 2003 Jean-Louis Bergamo --- --- 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$ --- --- =========================================================================== --- --- Definitions des constantes utilisés comme parametres de configuration --- - - -create table llx_const -( - rowid SERIAL PRIMARY KEY, - "name" varchar(255), - "value" text, -- max 65535 caracteres - "type" varchar(6) CHECK (type IN ('yesno','texte','chaine')) , - "visible" smallint DEFAULT 1 NOT NULL, - "note" text, - UNIQUE(name) -); - -CREATE INDEX idx_llx_const_name ON llx_const (name); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- Copyright (C) 2003 Jean-Louis Bergamo +-- +-- 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_const.sql,v 1.8 2007/12/02 22:03:23 eldy Exp +-- =========================================================================== + +-- +-- Definitions des constantes utilisés comme parametres de configuration +-- + + +create table llx_const +( + rowid SERIAL PRIMARY KEY, + "name" varchar(255), + "value" text, -- max 65535 caracteres + "type" varchar(6) CHECK (type IN ('yesno','texte','chaine')) , + "visible" smallint DEFAULT 1 NOT NULL, + "note" text, + UNIQUE(name) +); + +CREATE INDEX idx_llx_const_name ON llx_const (name); diff --git a/pgsql/tables/llx_contrat.key.sql b/pgsql/tables/llx_contrat.key.sql index 3d09faa6538..4e77a30c2bd 100644 --- a/pgsql/tables/llx_contrat.key.sql +++ b/pgsql/tables/llx_contrat.key.sql @@ -1,38 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2004 Rodolphe Quiedeville --- Copyright (C) 2004-2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - --- Supprimme orhpelins pour permettre montée de la clé --- 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.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; - -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 CONSTRAINT fk_contrat_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Laurent Destailleur +-- +-- 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_contrat.key.sql,v 1.11 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + + +-- Supprimme orhpelins pour permettre montée de la clé +-- 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.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; + +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 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); \ No newline at end of file diff --git a/pgsql/tables/llx_contrat.sql b/pgsql/tables/llx_contrat.sql index ad929adcbbf..de2bbe519a0 100644 --- a/pgsql/tables/llx_contrat.sql +++ b/pgsql/tables/llx_contrat.sql @@ -1,49 +1,47 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2004 Rodolphe Quiedeville --- Copyright (C) 2004-2005 Laurent Destailleur --- --- 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_contrat -( - rowid SERIAL PRIMARY KEY, - "ref" varchar(30), -- reference de contrat - "tms" timestamp, - "datec" timestamp, -- date de creation de l'enregistrement - "date_contrat" timestamp, - "statut" smallint DEFAULT 0, - "mise_en_service" timestamp, - "fin_validite" timestamp, - "date_cloture" timestamp, - "fk_soc" integer NOT NULL, - "fk_projet" integer, - "fk_commercial_signature" integer NOT NULL, -- obsolete - "fk_commercial_suivi" integer NOT NULL, -- obsolete - "fk_user_author" integer NOT NULL default 0, - "fk_user_mise_en_service" integer, - "fk_user_cloture" integer, - "note" text, - "note_public" text -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Laurent Destailleur +-- +-- 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_contrat.sql,v 1.13 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + +create table llx_contrat +( + rowid SERIAL PRIMARY KEY, + "ref" varchar(30), -- reference de contrat + "tms" timestamp, + "datec" timestamp, -- date de creation de l'enregistrement + "date_contrat" timestamp, + "statut" smallint DEFAULT 0, + "mise_en_service" timestamp, + "fin_validite" timestamp, + "date_cloture" timestamp, + "fk_soc" integer NOT NULL, + "fk_projet" integer, + "fk_commercial_signature" integer NOT NULL, -- obsolete + "fk_commercial_suivi" integer NOT NULL, -- obsolete + "fk_user_author" integer NOT NULL default 0, + "fk_user_mise_en_service" integer, + "fk_user_cloture" integer, + "note" text, + "note_public" text +); + diff --git a/pgsql/tables/llx_contratdet.key.sql b/pgsql/tables/llx_contratdet.key.sql index fd17dab7609..09dc03e7e6b 100644 --- a/pgsql/tables/llx_contratdet.key.sql +++ b/pgsql/tables/llx_contratdet.key.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004 Rodolphe Quiedeville --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -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_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_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_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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.key.sql,v 1.6 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + + +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_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_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_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); diff --git a/pgsql/tables/llx_contratdet.sql b/pgsql/tables/llx_contratdet.sql index f4c1f3a36ff..349c3a91c2e 100644 --- a/pgsql/tables/llx_contratdet.sql +++ b/pgsql/tables/llx_contratdet.sql @@ -1,63 +1,61 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004 Rodolphe Quiedeville --- --- 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_contratdet -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "fk_contrat" integer NOT NULL, - "fk_product" integer NULL, -- doit pouvoir etre nul pour ligne detail sans produits - "statut" smallint DEFAULT 0, - "label" text, -- libellé du produit - "description" text, - "fk_remise_except" integer NULL, -- Lien vers table des remises fixes - "date_commande" timestamp, - "date_ouverture_prevue" timestamp, - "date_ouverture" timestamp, -- date d'ouverture du service chez le client - "date_fin_validite" timestamp, - "date_cloture" timestamp, - "tva_tx" real(6,3) DEFAULT 0 NOT NULL, -- taux tva - "qty" real NOT NULL, -- quantité - "remise_percent" real DEFAULT 0, -- pourcentage de remise - "subprice" real(16,8), -- prix unitaire - "price_ht" real, -- prix final (obsolete) - "remise" real DEFAULT 0, -- montant de la remise (obsolete) - "total_ht" real(16,8) NOT NULL, -- Total HT de la ligne toute quantité et incluant remise ligne et globale - "total_tva" real(16,8) NOT NULL, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale - "total_ttc" real(16,8) NOT NULL, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale - "info_bits" integer DEFAULT 0, -- TVA NPR ou non - "fk_user_author" integer NOT NULL default 0, - "fk_user_ouverture" integer, - "fk_user_cloture" integer, - "commentaire" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- 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.sql,v 1.9 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + + + + + + + + +create table llx_contratdet +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "fk_contrat" integer NOT NULL, + "fk_product" integer NULL, -- doit pouvoir etre nul pour ligne detail sans produits + "statut" smallint DEFAULT 0, + "label" text, -- libellé du produit + "description" text, + "fk_remise_except" integer NULL, -- Lien vers table des remises fixes + "date_commande" timestamp, + "date_ouverture_prevue" timestamp, + "date_ouverture" timestamp, -- date d'ouverture du service chez le client + "date_fin_validite" timestamp, + "date_cloture" timestamp, + "tva_tx" real(6,3) DEFAULT 0, -- taux tva + "qty" real NOT NULL, -- quantité + "remise_percent" real DEFAULT 0, -- pourcentage de remise + "subprice" real(24,8) DEFAULT 0, -- prix unitaire + "price_ht" real, -- prix final (obsolete) + "remise" real DEFAULT 0, -- montant de la remise (obsolete) + "total_ht" real(24,8) DEFAULT 0, -- Total HT de la ligne toute quantité et incluant remise ligne et globale + "total_tva" real(24,8) DEFAULT 0, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale + "total_ttc" real(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale + "info_bits" integer DEFAULT 0, -- TVA NPR ou non + "fk_user_author" integer NOT NULL DEFAULT 0, + "fk_user_ouverture" integer, + "fk_user_cloture" integer, + "commentaire" text +); diff --git a/pgsql/tables/llx_contratdet_log.key.sql b/pgsql/tables/llx_contratdet_log.key.sql index 6d5f69decd5..c4e20c75324 100644 --- a/pgsql/tables/llx_contratdet_log.key.sql +++ b/pgsql/tables/llx_contratdet_log.key.sql @@ -1,30 +1,28 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006 Laurent Destailleur --- --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006 Laurent Destailleur +-- +-- 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.2 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + +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); diff --git a/pgsql/tables/llx_contratdet_log.sql b/pgsql/tables/llx_contratdet_log.sql index 92e57a8324f..bcca0f48149 100644 --- a/pgsql/tables/llx_contratdet_log.sql +++ b/pgsql/tables/llx_contratdet_log.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004 Rodolphe Quiedeville --- --- 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_contratdet_log -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "fk_contratdet" integer NOT NULL, - "date" timestamp, - "statut" smallint NOT NULL, - "fk_user_author" integer NOT NULL, - "commentaire" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- 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.sql,v 1.3 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + + +create table llx_contratdet_log +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "fk_contratdet" integer NOT NULL, + "date" timestamp, + "statut" smallint NOT NULL, + "fk_user_author" integer NOT NULL, + "commentaire" text +); diff --git a/pgsql/tables/llx_cotisation.key.sql b/pgsql/tables/llx_cotisation.key.sql index 770d6e2c3a7..9e781982eb3 100644 --- a/pgsql/tables/llx_cotisation.key.sql +++ b/pgsql/tables/llx_cotisation.key.sql @@ -1,27 +1,25 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2007 Laurent Destailleur --- --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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.3 2007/12/02 22:03:23 eldy Exp +-- ============================================================================ + +ALTER TABLE llx_cotisation ADD UNIQUE INDEX uk_cotisation (fk_adherent,dateadh); diff --git a/pgsql/tables/llx_cotisation.sql b/pgsql/tables/llx_cotisation.sql index ee6f64a076c..ed690dd570f 100644 --- a/pgsql/tables/llx_cotisation.sql +++ b/pgsql/tables/llx_cotisation.sql @@ -1,36 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_cotisation -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "datec" timestamp, - "fk_adherent" integer, - "dateadh" timestamp, - "cotisation" real, - "fk_bank" int4 DEFAULT NULL, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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.sql,v 1.9 2007/12/02 22:03:23 eldy Exp +-- =================================================================== + +create table llx_cotisation +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "datec" timestamp, + "fk_adherent" integer, + "dateadh" timestamp, + "datef" date, + "cotisation" real, + "fk_bank" int4 DEFAULT NULL, + "note" text +); diff --git a/pgsql/tables/llx_deplacement.sql b/pgsql/tables/llx_deplacement.sql index 28fee67c2b4..4f0c13eeb7c 100644 --- a/pgsql/tables/llx_deplacement.sql +++ b/pgsql/tables/llx_deplacement.sql @@ -1,39 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_deplacement -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "dated" timestamp, - "fk_user" integer NOT NULL, - "fk_user_author" integer, - "type" smallint NOT NULL, - "km" smallint, - "fk_soc" integer, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_deplacement.sql,v 1.4 2007/12/02 22:00:08 eldy Exp +-- ============================================================================ + +create table llx_deplacement +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "dated" timestamp, + "fk_user" integer NOT NULL, + "fk_user_author" integer, + "type" smallint NOT NULL, + "km" smallint, + "fk_soc" integer, + "note" text +); diff --git a/pgsql/tables/llx_document.sql b/pgsql/tables/llx_document.sql index c6ac8568e22..f00e3f19af7 100644 --- a/pgsql/tables/llx_document.sql +++ b/pgsql/tables/llx_document.sql @@ -1,37 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2007 Rodolphe Quiedeville --- --- 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' -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2007 Rodolphe Quiedeville +-- +-- 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.3 2007/12/02 22:00:08 eldy Exp +-- =================================================================== + + +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' +); diff --git a/pgsql/tables/llx_document_generator.sql b/pgsql/tables/llx_document_generator.sql index a9413f5ba92..fbb088584d3 100644 --- a/pgsql/tables/llx_document_generator.sql +++ b/pgsql/tables/llx_document_generator.sql @@ -1,33 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2007 Rodolphe Quiedeville --- --- 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 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2007 Rodolphe Quiedeville +-- +-- 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.3 2007/12/02 22:00:08 eldy Exp +-- =================================================================== + + +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 +); diff --git a/pgsql/tables/llx_document_model.key.sql b/pgsql/tables/llx_document_model.key.sql index cf9aa929788..ab4cb3b0636 100644 --- a/pgsql/tables/llx_document_model.key.sql +++ b/pgsql/tables/llx_document_model.key.sql @@ -1,28 +1,26 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2007 Laurent Destailleur --- --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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.2 2007/12/02 22:00:08 eldy Exp +-- =================================================================== + + +ALTER TABLE llx_document_model ADD UNIQUE uk_document_model (nom,type); diff --git a/pgsql/tables/llx_document_model.sql b/pgsql/tables/llx_document_model.sql index 1df33e5e4f6..4c84fa04b5f 100644 --- a/pgsql/tables/llx_document_model.sql +++ b/pgsql/tables/llx_document_model.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2003 Rodolphe Quiedeville --- Copyright (C) 2006 Laurent Destailleur --- --- 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$ --- --- Liste des modeles de document disponibles --- --- =================================================================== - -create table llx_document_model -( - rowid SERIAL PRIMARY KEY, - "nom" varchar(50), - "type" varchar(20) NOT NULL, - "libelle" varchar(255), - "description" text +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2003 Rodolphe Quiedeville +-- Copyright (C) 2006 Laurent Destailleur +-- +-- 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.sql,v 1.7 2007/12/02 22:00:08 eldy Exp +-- +-- Liste des modeles de document disponibles +-- =================================================================== + +create table llx_document_model +( + rowid SERIAL PRIMARY KEY, + "nom" varchar(50), + "type" varchar(20) NOT NULL, + "libelle" varchar(255), + "description" text ); \ No newline at end of file diff --git a/pgsql/tables/llx_dolibarr_modules.sql b/pgsql/tables/llx_dolibarr_modules.sql index 57db60c1112..17cf85aa438 100644 --- a/pgsql/tables/llx_dolibarr_modules.sql +++ b/pgsql/tables/llx_dolibarr_modules.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_dolibarr_modules -( - numero integer PRIMARY KEY, - "active" smallint DEFAULT 0 NOT NULL, - "active_date" timestamp NOT NULL, - "active_version" varchar(25) NOT NULL -); - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_dolibarr_modules.sql,v 1.3 2007/12/02 22:00:08 eldy Exp +-- ======================================================================== + + +create table llx_dolibarr_modules +( + numero integer PRIMARY KEY, + "active" smallint DEFAULT 0 NOT NULL, + "active_date" timestamp NOT NULL, + "active_version" varchar(25) NOT NULL +); + + diff --git a/pgsql/tables/llx_domain.sql b/pgsql/tables/llx_domain.sql index 9966a3bd84e..39a9bd604ca 100644 --- a/pgsql/tables/llx_domain.sql +++ b/pgsql/tables/llx_domain.sql @@ -1,34 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2002 Rodolphe Quiedeville --- --- 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_domain -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "label" varchar(255), - "note" text -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- +-- 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_domain.sql,v 1.4 2007/12/02 22:00:09 eldy Exp +-- =================================================================== + +create table llx_domain +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "label" varchar(255), + "note" text +); + diff --git a/pgsql/tables/llx_don.sql b/pgsql/tables/llx_don.sql index 980a37cb8c5..66797f3525b 100644 --- a/pgsql/tables/llx_don.sql +++ b/pgsql/tables/llx_don.sql @@ -1,49 +1,48 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2002 Rodolphe Quiedeville --- --- 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_don -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "fk_statut" smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid - "datec" timestamp, -- date de création de l'enregistrement - "datedon" timestamp, -- date du don/promesse - "amount" real DEFAULT 0, - "fk_paiement" integer, - "prenom" varchar(50), - "nom" varchar(50), - "societe" varchar(50), - "adresse" text, - "cp" varchar(30), - "ville" varchar(50), - "pays" varchar(50), - "email" varchar(255), - "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_user_author" integer NOT NULL, - "fk_user_valid" integer NOT NULL, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- +-- 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_don.sql,v 1.11 2007/12/02 22:00:09 eldy Exp +-- =================================================================== + + +create table llx_don +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "fk_statut" smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid + "datec" timestamp, -- date de création de l'enregistrement + "datedon" timestamp, -- date du don/promesse + "amount" real DEFAULT 0, + "fk_paiement" integer, + "prenom" varchar(50), + "nom" varchar(50), + "societe" varchar(50), + "adresse" text, + "cp" varchar(30), + "ville" varchar(50), + "pays" varchar(50), + "email" varchar(255), + "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_user_author" integer NOT NULL, + "fk_user_valid" integer NOT NULL, + "note" text +); diff --git a/pgsql/tables/llx_don_projet.sql b/pgsql/tables/llx_don_projet.sql index e34f75549e6..97981e652b7 100644 --- a/pgsql/tables/llx_don_projet.sql +++ b/pgsql/tables/llx_don_projet.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2002 Rodolphe Quiedeville --- --- 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_don_projet -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "datec" timestamp, - "libelle" varchar(255), - "fk_user_author" integer NOT NULL, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- +-- 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_don_projet.sql,v 1.5 2007/12/02 22:00:09 eldy Exp +-- =================================================================== + +create table llx_don_projet +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "datec" timestamp, + "libelle" varchar(255), + "fk_user_author" integer NOT NULL, + "note" text +); diff --git a/pgsql/tables/llx_droitpret_rapport.sql b/pgsql/tables/llx_droitpret_rapport.sql index e26c6e19116..64f2bb1d454 100644 --- a/pgsql/tables/llx_droitpret_rapport.sql +++ b/pgsql/tables/llx_droitpret_rapport.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2007 Patrick Raguin --- --- 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; +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2007 Patrick Raguin +-- +-- 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 +-- ======================================================================== + + +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; diff --git a/pgsql/tables/llx_element_contact.key.sql b/pgsql/tables/llx_element_contact.key.sql index c1e345347ea..3ffe2751ef2 100644 --- a/pgsql/tables/llx_element_contact.key.sql +++ b/pgsql/tables/llx_element_contact.key.sql @@ -1,33 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 patrick Rouillon --- --- 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$ --- --- ============================================================================ - - -ALTER TABLE llx_element_contact - ADD UNIQUE INDEX idx_element_contact_idx1 (element_id, fk_c_type_contact, fk_socpeople); - -ALTER TABLE llx_element_contact - ADD CONSTRAINT fk_element_contact_fk_c_type_contact - FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 patrick Rouillon +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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_element_contact.key.sql,v 1.6 2007/12/02 21:58:49 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_element_contact + ADD UNIQUE INDEX idx_element_contact_idx1 (element_id, fk_c_type_contact, fk_socpeople); + +ALTER TABLE llx_element_contact + ADD CONSTRAINT fk_element_contact_fk_c_type_contact + FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid); + + +ALTER TABLE llx_element_contact ADD INDEX idx_element_contact_fk_socpeople (fk_socpeople); +-- Pas de contraite sur fk_socpeople car point sur llx_socpeople mais aussi llx_user + \ No newline at end of file diff --git a/pgsql/tables/llx_element_contact.sql b/pgsql/tables/llx_element_contact.sql index 44db521fb61..516271a8a00 100644 --- a/pgsql/tables/llx_element_contact.sql +++ b/pgsql/tables/llx_element_contact.sql @@ -1,40 +1,39 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 patrick Rouillon --- --- 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$ --- --- Association de personnes/societes avec un element de la base (contrat, projet, propal). --- Permet de definir plusieur type d'intervenant sur un element. --- i.e. commercial, adresse de facturation, prestataire... --- ============================================================================ - -create table llx_element_contact -( - rowid SERIAL PRIMARY KEY, - "datecreate" timestamp NULL, -- date de creation de l'enregistrement - "statut" smallint DEFAULT 5, -- 5 inactif, 4 actif - - "element_id" int NOT NULL, -- la reference de l'element. - "fk_c_type_contact" int NOT NULL, -- nature du contact. - "fk_socpeople" integer NOT NULL -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 patrick Rouillon +-- +-- 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_element_contact.sql,v 1.3 2007/12/02 21:58:49 eldy Exp +-- ============================================================================ +-- Association de personnes/societes avec un element de la base (contrat, projet, propal). +-- Permet de definir plusieur type d'intervenant sur un element. +-- i.e. commercial, adresse de facturation, prestataire... +-- ============================================================================ + +create table llx_element_contact +( + rowid SERIAL PRIMARY KEY, + "datecreate" timestamp NULL, -- date de creation de l'enregistrement + "statut" smallint DEFAULT 5, -- 5 inactif, 4 actif + + "element_id" int NOT NULL, -- la reference de l'element. + "fk_c_type_contact" int NOT NULL, -- nature du contact. + "fk_socpeople" integer NOT NULL +); + diff --git a/pgsql/tables/llx_energie_compteur.sql b/pgsql/tables/llx_energie_compteur.sql index e3fc81d4f1d..774d4395b48 100644 --- a/pgsql/tables/llx_energie_compteur.sql +++ b/pgsql/tables/llx_energie_compteur.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_energie_compteur -( - rowid SERIAL PRIMARY KEY, - "libelle" varchar(50), - "fk_energie" integer NOT NULL, - "datec" timestamp, - "fk_user_author" integer NOT NULL, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_energie_compteur.sql,v 1.2 2007/12/02 21:58:49 eldy Exp +-- =================================================================== + + +create table llx_energie_compteur +( + rowid SERIAL PRIMARY KEY, + "libelle" varchar(50), + "fk_energie" integer NOT NULL, + "datec" timestamp, + "fk_user_author" integer NOT NULL, + "note" text +); diff --git a/pgsql/tables/llx_energie_compteur_groupe.sql b/pgsql/tables/llx_energie_compteur_groupe.sql index 3cec9e5e5b1..020c44f3a85 100644 --- a/pgsql/tables/llx_energie_compteur_groupe.sql +++ b/pgsql/tables/llx_energie_compteur_groupe.sql @@ -1,31 +1,29 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_energie_compteur_groupe -( - "fk_energie_compteur" integer NOT NULL, - "fk_energie_groupe" integer NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_energie_compteur_groupe.sql,v 1.2 2007/12/02 21:58:49 eldy Exp +-- =================================================================== + +create table llx_energie_compteur_groupe +( + "fk_energie_compteur" integer NOT NULL, + "fk_energie_groupe" integer NOT NULL +); diff --git a/pgsql/tables/llx_energie_compteur_releve.sql b/pgsql/tables/llx_energie_compteur_releve.sql index 5c9b897b72e..ab049474388 100644 --- a/pgsql/tables/llx_energie_compteur_releve.sql +++ b/pgsql/tables/llx_energie_compteur_releve.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_energie_compteur_releve -( - rowid SERIAL PRIMARY KEY, - "fk_compteur" integer NOT NULL, - "date_releve" timestamp, - "valeur" real, - "datec" timestamp, - "fk_user_author" integer NOT NULL, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_energie_compteur_releve.sql,v 1.2 2007/12/02 21:58:49 eldy Exp +-- =================================================================== + + +create table llx_energie_compteur_releve +( + rowid SERIAL PRIMARY KEY, + "fk_compteur" integer NOT NULL, + "date_releve" timestamp, + "valeur" real, + "datec" timestamp, + "fk_user_author" integer NOT NULL, + "note" text +); diff --git a/pgsql/tables/llx_energie_groupe.sql b/pgsql/tables/llx_energie_groupe.sql index 8587ad4b566..5b0fb446ceb 100644 --- a/pgsql/tables/llx_energie_groupe.sql +++ b/pgsql/tables/llx_energie_groupe.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_energie_groupe -( - rowid SERIAL PRIMARY KEY, - "libelle" varchar(100), - "datec" timestamp, - "fk_user_author" integer NOT NULL, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_energie_groupe.sql,v 1.2 2007/12/02 21:58:49 eldy Exp +-- =================================================================== + + +create table llx_energie_groupe +( + rowid SERIAL PRIMARY KEY, + "libelle" varchar(100), + "datec" timestamp, + "fk_user_author" integer NOT NULL, + "note" text +); diff --git a/pgsql/tables/llx_entrepot.sql b/pgsql/tables/llx_entrepot.sql index 9c10d940c76..5aa95172907 100644 --- a/pgsql/tables/llx_entrepot.sql +++ b/pgsql/tables/llx_entrepot.sql @@ -1,44 +1,42 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003-2006 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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_entrepot -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "label" varchar(255) UNIQUE NOT NULL, - "description" text, - "lieu" varchar(64), -- résumé lieu situation - "address" varchar(255), - "cp" varchar(10), - "ville" varchar(50), - "fk_pays" integer DEFAULT 0, - "statut" smallint DEFAULT 1, -- 1 ouvert, 0 fermé - "valo_pmp" float(12,4), -- valoristaion du stock en PMP - "fk_user_author" integer -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003-2006 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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.sql,v 1.11 2007/12/02 21:58:49 eldy Exp +-- ============================================================================ + +create table llx_entrepot +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "label" varchar(255) UNIQUE NOT NULL, + "description" text, + "lieu" varchar(64), -- résumé lieu situation + "address" varchar(255), + "cp" varchar(10), + "ville" varchar(50), + "fk_pays" integer DEFAULT 0, + "statut" smallint DEFAULT 1, -- 1 ouvert, 0 fermé + "valo_pmp" float(12,4), -- valoristaion du stock en PMP + "fk_user_author" integer +); + diff --git a/pgsql/tables/llx_entrepot_valorisation.sql b/pgsql/tables/llx_entrepot_valorisation.sql index 436c711a20b..e299ff7a030 100644 --- a/pgsql/tables/llx_entrepot_valorisation.sql +++ b/pgsql/tables/llx_entrepot_valorisation.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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 à 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); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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.3 2007/12/02 21:58:49 eldy Exp +-- ============================================================================ + +create table llx_entrepot_valorisation +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, -- date technique mise à 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); + diff --git a/pgsql/tables/llx_expedition.sql b/pgsql/tables/llx_expedition.sql index 8f9fe6e545b..9607dce1303 100644 --- a/pgsql/tables/llx_expedition.sql +++ b/pgsql/tables/llx_expedition.sql @@ -1,49 +1,47 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_expedition -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "ref" varchar(30) NOT NULL, - "fk_commande" integer, - "date_creation" timestamp, -- date de creation - "date_valid" timestamp, -- date de validation - "date_expedition" date, -- date de l'expedition - "fk_user_author" integer, -- createur - "fk_user_valid" integer, -- valideur - "fk_entrepot" integer, - "fk_expedition_methode" integer, - "fk_statut" smallint DEFAULT 0, - "note" text, - "model_pdf" varchar(50), - UNIQUE(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_commande ON llx_expedition (fk_commande); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_expedition.sql,v 1.4 2007/12/02 21:58:49 eldy Exp +-- =================================================================== + + +create table llx_expedition +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "ref" varchar(30) NOT NULL, + "fk_commande" integer, + "date_creation" timestamp, -- date de creation + "date_valid" timestamp, -- date de validation + "date_expedition" date, -- date de l'expedition + "fk_user_author" integer, -- createur + "fk_user_valid" integer, -- valideur + "fk_entrepot" integer, + "fk_expedition_methode" integer, + "fk_statut" smallint DEFAULT 0, + "note" text, + "model_pdf" varchar(50), + UNIQUE(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_commande ON llx_expedition (fk_commande); diff --git a/pgsql/tables/llx_expedition_methode.sql b/pgsql/tables/llx_expedition_methode.sql index 7c72750174a..1d186a4e207 100644 --- a/pgsql/tables/llx_expedition_methode.sql +++ b/pgsql/tables/llx_expedition_methode.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_expedition_methode -( - rowid integer PRIMARY KEY, - "tms" timestamp, - "code" varchar(30) NOT NULL, - "libelle" varchar(50) NOT NULL, - "description" text, - "statut" smallint DEFAULT 0 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_expedition_methode.sql,v 1.6 2007/12/02 21:58:49 eldy Exp +-- =================================================================== + +create table llx_expedition_methode +( + rowid integer PRIMARY KEY, + "tms" timestamp, + "code" varchar(30) NOT NULL, + "libelle" varchar(50) NOT NULL, + "description" text, + "statut" smallint DEFAULT 0 +); diff --git a/pgsql/tables/llx_expeditiondet.sql b/pgsql/tables/llx_expeditiondet.sql index 3b4f7984e29..54767842408 100644 --- a/pgsql/tables/llx_expeditiondet.sql +++ b/pgsql/tables/llx_expeditiondet.sql @@ -1,36 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_expeditiondet -( - rowid SERIAL PRIMARY KEY, - "fk_expedition" integer NOT NULL, - "fk_commande_ligne" integer NOT NULL, - "qty" real -- quantité -); - -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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_expeditiondet.sql,v 1.4 2007/12/02 21:58:49 eldy Exp +-- =================================================================== + + +create table llx_expeditiondet +( + rowid SERIAL PRIMARY KEY, + "fk_expedition" integer NOT NULL, + "fk_commande_ligne" integer NOT NULL, + "qty" real -- quantité +); + +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); diff --git a/pgsql/tables/llx_export_compta.sql b/pgsql/tables/llx_export_compta.sql index a65205061d8..b5c06d37419 100644 --- a/pgsql/tables/llx_export_compta.sql +++ b/pgsql/tables/llx_export_compta.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville --- --- 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$ --- =================================================================== --- --- $Revision$ - - -create table llx_export_compta -( - rowid SERIAL PRIMARY KEY, - "ref" varchar(12) NOT NULL, - "date_export" timestamp, -- date de creation - "fk_user" integer NOT NULL, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- 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_compta.sql,v 1.3 2007/12/02 21:58:49 eldy Exp +-- =================================================================== + + + +create table llx_export_compta +( + rowid SERIAL PRIMARY KEY, + "ref" varchar(12) NOT NULL, + "date_export" timestamp, -- date de creation + "fk_user" integer NOT NULL, + "note" text +); diff --git a/pgsql/tables/llx_export_model.key.sql b/pgsql/tables/llx_export_model.key.sql index 1ec7385d3e7..ed2c4961075 100644 --- a/pgsql/tables/llx_export_model.key.sql +++ b/pgsql/tables/llx_export_model.key.sql @@ -1,29 +1,27 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2007 Laurent Destailleur --- Copyright (C) 2007 Regis Houssin --- --- 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.2 2007/09/01 15:03:43 hregis Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/pgsql/tables/llx_export_model.key.sql,v $ --- --- =================================================================== - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2007 Laurent Destailleur +-- Copyright (C) 2007 Regis Houssin +-- +-- 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.3 2007/12/02 21:58:49 eldy Exp +-- =================================================================== + + ALTER TABLE llx_export_model ADD UNIQUE uk_export_model (label); \ No newline at end of file diff --git a/pgsql/tables/llx_export_model.sql b/pgsql/tables/llx_export_model.sql index 1fe5b976892..e0ff3299b8b 100644 --- a/pgsql/tables/llx_export_model.sql +++ b/pgsql/tables/llx_export_model.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2003 Rodolphe Quiedeville --- Copyright (C) 2007 Regis Houssin --- --- 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/09/01 15:03:43 hregis Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/pgsql/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 +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2003 Rodolphe Quiedeville +-- Copyright (C) 2007 Regis Houssin +-- +-- 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.4 2007/12/02 21:58:49 eldy Exp +-- +-- 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 ); \ No newline at end of file diff --git a/pgsql/tables/llx_fa_pr.sql b/pgsql/tables/llx_fa_pr.sql index 52c2ab8c550..948db2fda71 100644 --- a/pgsql/tables/llx_fa_pr.sql +++ b/pgsql/tables/llx_fa_pr.sql @@ -1,31 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2002 Rodolphe Quiedeville --- --- 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_fa_pr -( - rowid SERIAL PRIMARY KEY, - "fk_facture" integer, - "fk_propal" integer -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- +-- 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_fa_pr.sql,v 1.6 2007/12/02 21:37:38 eldy Exp +-- =================================================================== + + +create table llx_fa_pr +( + rowid SERIAL PRIMARY KEY, + "fk_facture" integer, + "fk_propal" integer +); diff --git a/pgsql/tables/llx_facture.key.sql b/pgsql/tables/llx_facture.key.sql index e88e185ce19..93043a19b81 100644 --- a/pgsql/tables/llx_facture.key.sql +++ b/pgsql/tables/llx_facture.key.sql @@ -1,41 +1,39 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -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_valid (fk_user_valid); -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 (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_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 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_facture.key.sql,v 1.10 2007/12/02 21:37:38 eldy Exp +-- ============================================================================ + + +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_valid (fk_user_valid); +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 (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_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 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); diff --git a/pgsql/tables/llx_facture.sql b/pgsql/tables/llx_facture.sql index 742889546fe..4a4fb375a8d 100644 --- a/pgsql/tables/llx_facture.sql +++ b/pgsql/tables/llx_facture.sql @@ -1,66 +1,66 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =========================================================================== --- Copyright (C) 2001-2005 Rodolphe Quiedeville --- Copyright (C) 2006 Laurent Destailleur --- --- 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_facture -( - rowid SERIAL PRIMARY KEY, - "facnumber" varchar(30) NOT NULL, - "type" smallint DEFAULT 0 NOT NULL, - "ref_client" varchar(30), - "increment" varchar(10), - "fk_soc" integer NOT NULL, - "datec" timestamp, -- date de creation de la facture - "datef" date, -- date de la facture - "date_valid" date, -- date de validation - "paye" smallint DEFAULT 0 NOT NULL, - "amount" real DEFAULT 0 NOT NULL, - "remise_percent" real DEFAULT 0, -- remise relative - "remise_absolue" real DEFAULT 0, -- remise absolue - "remise" real DEFAULT 0, -- remise totale calculee - "close_code" varchar(16), -- Code motif cloture sans paiement complet - "close_note" varchar(128), -- Commentaire cloture sans paiement complet - "tva" real DEFAULT 0, -- montant tva apres remise totale - "total" real DEFAULT 0, -- montant total ht apres remise totale - "total_ttc" real DEFAULT 0, -- montant total ttc apres remise totale - "fk_statut" smallint DEFAULT 0 NOT NULL, - "fk_user_author" integer, -- createur de la facture - "fk_user_valid" integer, -- valideur de la facture - "fk_facture_source" integer, -- facture origine si facture avoir - "fk_projet" integer, -- projet auquel est associé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élèvement) - "date_lim_reglement" date, -- date limite de reglement - "note" text, - "note_public" text, - "model_pdf" varchar(50) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =========================================================================== +-- Copyright (C) 2001-2005 Rodolphe Quiedeville +-- Copyright (C) 2006 Laurent Destailleur +-- +-- 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_facture.sql,v 1.35 2007/12/02 21:37:38 eldy Exp +-- =========================================================================== + + + + + + + + + +create table llx_facture +( + rowid SERIAL PRIMARY KEY, + "facnumber" varchar(30) NOT NULL, + "type" smallint DEFAULT 0 NOT NULL, + "ref_client" varchar(30), + "increment" varchar(10), + "fk_soc" integer NOT NULL, + "datec" timestamp, -- date de creation de la facture + "datef" date, -- date de la facture + "date_valid" date, -- date de validation + "paye" smallint DEFAULT 0 NOT NULL, + "amount" real DEFAULT 0 NOT NULL, + "remise_percent" real DEFAULT 0, -- remise relative + "remise_absolue" real DEFAULT 0, -- remise absolue + "remise" real DEFAULT 0, -- remise totale calculee + "close_code" varchar(16), -- Code motif cloture sans paiement complet + "close_note" varchar(128), -- Commentaire cloture sans paiement complet + "tva" real DEFAULT 0, -- montant tva apres remise totale + "total" real DEFAULT 0, -- montant total ht apres remise totale + "total_ttc" real DEFAULT 0, -- montant total ttc apres remise totale + "fk_statut" smallint DEFAULT 0 NOT NULL, + "fk_user_author" integer, -- createur de la facture + "fk_user_valid" integer, -- valideur de la facture + "fk_facture_source" integer, -- facture origine si facture avoir + "fk_projet" integer, -- projet auquel est associé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élèvement) + "date_lim_reglement" date, -- date limite de reglement + "note" text, + "note_public" text, + "model_pdf" varchar(50) +); diff --git a/pgsql/tables/llx_facture_fourn.key.sql b/pgsql/tables/llx_facture_fourn.key.sql index 45288f7f0dc..22794fdbcfc 100644 --- a/pgsql/tables/llx_facture_fourn.key.sql +++ b/pgsql/tables/llx_facture_fourn.key.sql @@ -1,40 +1,38 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -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_date_lim_reglement (date_lim_reglement); - -ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_soc (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_fk_projet (fk_projet); - -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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_facture_fourn.key.sql,v 1.6 2007/12/02 21:37:38 eldy Exp +-- ============================================================================ + + +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_date_lim_reglement (date_lim_reglement); + +ALTER TABLE llx_facture_fourn ADD INDEX idx_facture_fourn_fk_soc (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_fk_projet (fk_projet); + +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); diff --git a/pgsql/tables/llx_facture_fourn.sql b/pgsql/tables/llx_facture_fourn.sql index 5b531783320..82dd41fdbe4 100644 --- a/pgsql/tables/llx_facture_fourn.sql +++ b/pgsql/tables/llx_facture_fourn.sql @@ -1,58 +1,56 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =========================================================================== --- Copyright (C) 2001-2003 Rodolphe Quiedeville --- Copyright (C) 2007 Laurent Destailleur --- --- 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_facture_fourn -( - rowid SERIAL PRIMARY KEY, - "facnumber" varchar(50) NOT NULL, - "type" smallint DEFAULT 0 NOT NULL, - "fk_soc" integer NOT NULL, - "datec" timestamp, -- date de creation de la facture - "datef" date, -- date de la facture - "libelle" varchar(255), - "paye" smallint DEFAULT 0 NOT NULL, - "amount" real(16,8) DEFAULT 0 NOT NULL, - "remise" real(16,8) DEFAULT 0, - "tva" real(16,8) DEFAULT 0, - "total" real(16,8) DEFAULT 0, - "total_ht" real(16,8) DEFAULT 0, - "total_tva" real(16,8) DEFAULT 0, - "total_ttc" real(16,8) DEFAULT 0, - "fk_statut" smallint DEFAULT 0 NOT NULL, - "fk_user_author" integer, -- createur de la facture - "fk_user_valid" integer, -- valideur de la facture - "fk_projet" integer, -- projet auquel est associée la facture - "fk_cond_reglement" integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...) - "date_lim_reglement" date, -- date limite de reglement - "note" text, - "note_public" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =========================================================================== +-- Copyright (C) 2001-2003 Rodolphe Quiedeville +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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_facture_fourn.sql,v 1.15 2007/12/02 21:37:38 eldy Exp +-- =========================================================================== + + + + + + +create table llx_facture_fourn +( + rowid SERIAL PRIMARY KEY, + "facnumber" varchar(50) NOT NULL, + "type" smallint DEFAULT 0 NOT NULL, + "fk_soc" integer NOT NULL, + "datec" timestamp, -- date de creation de la facture + "datef" date, -- date de la facture + "libelle" varchar(255), + "paye" smallint DEFAULT 0 NOT NULL, + "amount" real(24,8) DEFAULT 0 NOT NULL, + "remise" real(24,8) DEFAULT 0, + "tva" real(24,8) DEFAULT 0, + "total" real(24,8) DEFAULT 0, + "total_ht" real(24,8) DEFAULT 0, + "total_tva" real(24,8) DEFAULT 0, + "total_ttc" real(24,8) DEFAULT 0, + "fk_statut" smallint DEFAULT 0 NOT NULL, + "fk_user_author" integer, -- createur de la facture + "fk_user_valid" integer, -- valideur de la facture + "fk_projet" integer, -- projet auquel est associée la facture + "fk_cond_reglement" integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...) + "date_lim_reglement" date, -- date limite de reglement + "note" text, + "note_public" text +); diff --git a/pgsql/tables/llx_facture_fourn_det.key.sql b/pgsql/tables/llx_facture_fourn_det.key.sql index 1e789f87ef9..4bc2326ce53 100644 --- a/pgsql/tables/llx_facture_fourn_det.key.sql +++ b/pgsql/tables/llx_facture_fourn_det.key.sql @@ -1,31 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- =================================================================== - - --- Supprimme orphelins pour permettre montée de la clé --- 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 CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_facture_fourn_det.key.sql,v 1.3 2007/12/02 21:37:38 eldy Exp +-- =================================================================== + + +-- Supprimme orphelins pour permettre montée de la clé +-- 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 CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid); diff --git a/pgsql/tables/llx_facture_fourn_det.sql b/pgsql/tables/llx_facture_fourn_det.sql index eb52905a046..3b3a80945cf 100644 --- a/pgsql/tables/llx_facture_fourn_det.sql +++ b/pgsql/tables/llx_facture_fourn_det.sql @@ -1,40 +1,39 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_facture_fourn_det -( - rowid SERIAL PRIMARY KEY, - "fk_facture_fourn" integer NOT NULL, - "fk_product" integer NULL, - "description" text, - "pu_ht" real(16,8), - "pu_ttc" real(16,8), - "qty" smallint DEFAULT 1, - "tva_taux" real(16,8) DEFAULT 0, - "total_ht" real(16,8) DEFAULT 0, - "tva" real(16,8) DEFAULT 0, - "total_ttc" real(16,8) DEFAULT 0 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_facture_fourn_det.sql,v 1.8 2007/12/02 21:37:38 eldy Exp +-- =================================================================== + + +create table llx_facture_fourn_det +( + rowid SERIAL PRIMARY KEY, + "fk_facture_fourn" integer NOT NULL, + "fk_product" integer NULL, + "description" text, + "pu_ht" real(24,8), + "pu_ttc" real(24,8), + "qty" smallint DEFAULT 1, + "tva_taux" real(24,8) DEFAULT 0, + "total_ht" real(24,8) DEFAULT 0, + "tva" real(24,8) DEFAULT 0, + "total_ttc" real(24,8) DEFAULT 0 +); diff --git a/pgsql/tables/llx_facture_rec.key.sql b/pgsql/tables/llx_facture_rec.key.sql index e2afe6fccdc..08846bd77f4 100644 --- a/pgsql/tables/llx_facture_rec.key.sql +++ b/pgsql/tables/llx_facture_rec.key.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2004 Rodolphe Quiedeville --- Copyright (C) 2004-2006 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -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_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_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid); - -ALTER TABLE llx_facture_rec ADD UNIQUE INDEX idx_facture_rec_uk_titre (titre); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2006 Laurent Destailleur +-- +-- 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_facture_rec.key.sql,v 1.2 2007/12/02 21:37:39 eldy Exp +-- ============================================================================ + + +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_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_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid); + +ALTER TABLE llx_facture_rec ADD UNIQUE INDEX idx_facture_rec_uk_titre (titre); diff --git a/pgsql/tables/llx_facture_rec.sql b/pgsql/tables/llx_facture_rec.sql index 281ae881bc0..f315d239e82 100644 --- a/pgsql/tables/llx_facture_rec.sql +++ b/pgsql/tables/llx_facture_rec.sql @@ -1,56 +1,55 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =========================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2006 Laurent Destailleur --- --- 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_facture_rec -( - rowid SERIAL PRIMARY KEY, - "titre" varchar(50) NOT NULL, - "fk_soc" integer NOT NULL, - "datec" timestamp, -- date de creation - "amount" real DEFAULT 0 NOT NULL, - "remise" real DEFAULT 0, - "remise_percent" real DEFAULT 0, - "remise_absolue" real DEFAULT 0, - "tva" real DEFAULT 0, - "total" real DEFAULT 0, - "total_ttc" real DEFAULT 0, - "fk_user_author" integer, -- createur - "fk_projet" integer, -- projet auquel est associé la facture - "fk_cond_reglement" integer DEFAULT 0, -- condition de reglement - "fk_mode_reglement" integer DEFAULT 0, -- mode de reglement (Virement, Prélèvement) - "date_lim_reglement" date, -- date limite de reglement - "note" text, - "note_public" text, - "frequency" varchar(2) DEFAULT NULL, - "last_gen" varchar(7) DEFAULT NULL -); - -CREATE INDEX idx_facture_rec_fksoc ON llx_facture_rec (fk_soc); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =========================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2006 Laurent Destailleur +-- +-- 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_facture_rec.sql,v 1.8 2007/12/02 21:37:39 eldy Exp +-- =========================================================================== + + + + + + +create table llx_facture_rec +( + rowid SERIAL PRIMARY KEY, + "titre" varchar(50) NOT NULL, + "fk_soc" integer NOT NULL, + "datec" timestamp, -- date de creation + "amount" real DEFAULT 0 NOT NULL, + "remise" real DEFAULT 0, + "remise_percent" real DEFAULT 0, + "remise_absolue" real DEFAULT 0, + "tva" real DEFAULT 0, + "total" real DEFAULT 0, + "total_ttc" real DEFAULT 0, + "fk_user_author" integer, -- createur + "fk_projet" integer, -- projet auquel est associé la facture + "fk_cond_reglement" integer DEFAULT 0, -- condition de reglement + "fk_mode_reglement" integer DEFAULT 0, -- mode de reglement (Virement, Prélèvement) + "date_lim_reglement" date, -- date limite de reglement + "note" text, + "note_public" text, + "frequency" varchar(2) DEFAULT NULL, + "last_gen" varchar(7) DEFAULT NULL +); + +CREATE INDEX idx_facture_rec_fksoc ON llx_facture_rec (fk_soc); diff --git a/pgsql/tables/llx_facture_stats.sql b/pgsql/tables/llx_facture_stats.sql index 295123aa459..781ef0c0a9f 100644 --- a/pgsql/tables/llx_facture_stats.sql +++ b/pgsql/tables/llx_facture_stats.sql @@ -1,33 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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_facture_stats -( - "date_full" timestamp, - "date_day" date, - "data" varchar(50), - "value" real -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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_facture_stats.sql,v 1.3 2007/12/02 21:37:39 eldy Exp +-- =================================================================== + + +create table llx_facture_stats +( + "date_full" timestamp, + "date_day" date, + "data" varchar(50), + "value" real +); diff --git a/pgsql/tables/llx_facture_tva_sum.key.sql b/pgsql/tables/llx_facture_tva_sum.key.sql index d6140502f5c..e160ef61648 100644 --- a/pgsql/tables/llx_facture_tva_sum.key.sql +++ b/pgsql/tables/llx_facture_tva_sum.key.sql @@ -1,32 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- =================================================================== - - --- Supprimme orhpelins pour permettre montée de la clé --- 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 CONSTRAINT fk_facture_tva_sum_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_facture_tva_sum.key.sql,v 1.6 2007/12/02 21:37:39 eldy Exp +-- =================================================================== + + +-- Supprimme orhpelins pour permettre montée de la clé +-- 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 CONSTRAINT fk_facture_tva_sum_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); diff --git a/pgsql/tables/llx_facture_tva_sum.sql b/pgsql/tables/llx_facture_tva_sum.sql index 1552ee84d0c..0a378066ac3 100644 --- a/pgsql/tables/llx_facture_tva_sum.sql +++ b/pgsql/tables/llx_facture_tva_sum.sql @@ -1,31 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_facture_tva_sum -( - "fk_facture" integer NOT NULL, - "amount" real NOT NULL, - "tva_tx" real NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_facture_tva_sum.sql,v 1.6 2007/12/02 21:37:39 eldy Exp +-- =================================================================== + +create table llx_facture_tva_sum +( + "fk_facture" integer NOT NULL, + "amount" real NOT NULL, + "tva_tx" real NOT NULL +); diff --git a/pgsql/tables/llx_facturedet.key.sql b/pgsql/tables/llx_facturedet.key.sql index 925d014067d..b76b6963b2a 100644 --- a/pgsql/tables/llx_facturedet.key.sql +++ b/pgsql/tables/llx_facturedet.key.sql @@ -1,31 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- =================================================================== - - --- Supprimme orhpelins pour permettre montée de la clé --- 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 CONSTRAINT fk_facturedet_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_facturedet.key.sql,v 1.6 2007/12/02 21:37:39 eldy Exp +-- =================================================================== + + +-- Supprimme orhpelins pour permettre montée de la clé +-- 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 CONSTRAINT fk_facturedet_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); diff --git a/pgsql/tables/llx_facturedet.sql b/pgsql/tables/llx_facturedet.sql index 9c184587a17..65147ea0b08 100644 --- a/pgsql/tables/llx_facturedet.sql +++ b/pgsql/tables/llx_facturedet.sql @@ -1,50 +1,57 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2005 Rodolphe Quiedeville --- Copyright (C) 2004-2005 Laurent Destailleur --- --- 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_facturedet -( - rowid SERIAL PRIMARY KEY, - "fk_facture" integer NOT NULL, - "fk_product" integer NULL, -- Doit pouvoir etre nul pour ligne detail sans produits - "description" text, - "tva_taux" real, -- Taux tva produit/service (exemple 19.6) - "qty" real, -- Quantité (exemple 2) - "remise_percent" real DEFAULT 0, -- % de la remise ligne (exemple 20%) - "remise" real DEFAULT 0, -- Montant calculé de la remise % sur PU HT (exemple 20) - "fk_remise_except" integer NULL, -- Lien vers table des remises fixes - "subprice" real, -- P.U. HT (exemple 100) - "price" real, -- P.U. HT apres remise % de ligne - "total_ht" real, -- Total HT de la ligne toute quantité et incluant remise ligne et globale - "total_tva" real, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale - "total_ttc" real, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale - "date_start" timestamp, -- date debut si service - "date_end" timestamp, -- date fin si service - "info_bits" integer DEFAULT 0, -- TVA NPR ou non - "fk_code_ventilation" integer DEFAULT 0 NOT NULL, - "fk_export_compta" integer DEFAULT 0 NOT NULL, - "rang" integer DEFAULT 0, -- ordre d'affichage - "special_code" int2 DEFAULT 0 -- code pour les lignes speciales (livraison=1, ecotaxe=2) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2005 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Laurent Destailleur +-- +-- 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_facturedet.sql,v 1.24 2007/12/02 21:37:39 eldy Exp +-- =================================================================== + + +create table llx_facturedet +( + rowid SERIAL PRIMARY KEY, + "fk_facture" integer NOT NULL, + "fk_product" integer NULL, -- Doit pouvoir etre nul pour ligne detail sans produits + "description" text, + "tva_taux" real, -- Taux tva produit/service (exemple 19.6) + "qty" real, -- Quantité (exemple 2) + "remise_percent" real DEFAULT 0, -- % de la remise ligne (exemple 20%) + "remise" real DEFAULT 0, -- Montant calculé de la remise % sur PU HT (exemple 20) + "fk_remise_except" integer NULL, -- Lien vers table des remises fixes + "subprice" real, -- P.U. HT (exemple 100) + "price" real, -- P.U. HT apres remise % de ligne + "total_ht" real, -- Total HT de la ligne toute quantité et incluant remise ligne et globale + "total_tva" real, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale + "total_ttc" real, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale + "date_start" timestamp, -- date debut si service + "date_end" timestamp, -- date fin si service + "info_bits" integer DEFAULT 0, -- TVA NPR ou non + "fk_code_ventilation" integer DEFAULT 0 NOT NULL, + "fk_export_compta" integer DEFAULT 0 NOT NULL, + "special_code" int2 DEFAULT 0, -- code pour les lignes speciales + "rang" integer DEFAULT 0 -- ordre d'affichage +); + +-- +-- Liste des codes pour special_code +-- +-- 1 : frais de port +-- 2 : ecotaxe +-- \ No newline at end of file diff --git a/pgsql/tables/llx_facturedet_rec.sql b/pgsql/tables/llx_facturedet_rec.sql index f0c56a83476..69c3398e2fd 100644 --- a/pgsql/tables/llx_facturedet_rec.sql +++ b/pgsql/tables/llx_facturedet_rec.sql @@ -1,41 +1,40 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_facturedet_rec -( - rowid SERIAL PRIMARY KEY, - "fk_facture" integer NOT NULL, - "fk_product" integer, - "description" text, - "tva_taux" real DEFAULT 19.6, -- taux tva - "qty" real, -- quantité - "remise_percent" real DEFAULT 0, -- pourcentage de remise - "remise" real DEFAULT 0, -- montant de la remise - "subprice" real, -- prix avant remise - "price" real, -- prix final - "total_ht" real, -- Total HT de la ligne toute quantité et incluant remise ligne et globale - "total_tva" real, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale - "total_ttc" real -- Total TTC de la ligne toute quantité et incluant remise ligne et globale -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_facturedet_rec.sql,v 1.5 2007/12/02 21:37:39 eldy Exp +-- =================================================================== + +create table llx_facturedet_rec +( + rowid SERIAL PRIMARY KEY, + "fk_facture" integer NOT NULL, + "fk_product" integer, + "description" text, + "tva_taux" real DEFAULT 19.6, -- taux tva + "qty" real, -- quantité + "remise_percent" real DEFAULT 0, -- pourcentage de remise + "remise" real DEFAULT 0, -- montant de la remise + "subprice" real, -- prix avant remise + "price" real, -- prix final + "total_ht" real, -- Total HT de la ligne toute quantité et incluant remise ligne et globale + "total_tva" real, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale + "total_ttc" real -- Total TTC de la ligne toute quantité et incluant remise ligne et globale +); diff --git a/pgsql/tables/llx_fichinter.key.sql b/pgsql/tables/llx_fichinter.key.sql index 5f8338a47bd..31139108c9e 100644 --- a/pgsql/tables/llx_fichinter.key.sql +++ b/pgsql/tables/llx_fichinter.key.sql @@ -1,29 +1,27 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- =================================================================== - - -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 (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_fichinter.key.sql,v 1.6 2007/12/02 21:37:39 eldy Exp +-- =================================================================== + + +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 (rowid); diff --git a/pgsql/tables/llx_fichinter.sql b/pgsql/tables/llx_fichinter.sql index be80c3e7a14..8fbeba8006c 100644 --- a/pgsql/tables/llx_fichinter.sql +++ b/pgsql/tables/llx_fichinter.sql @@ -1,50 +1,48 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2007 Rodolphe Quiedeville --- --- 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_fichinter -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer NOT NULL, - "fk_projet" integer DEFAULT 0, -- projet auquel est rattache la fiche - "fk_contrat" integer DEFAULT 0, -- contrat auquel est rattache la fiche - "ref" varchar(30) NOT NULL, -- number - "tms" timestamp, - "datec" timestamp, -- date de creation - "date_valid" timestamp, -- date de validation - "datei" date, -- date de livraison du bon d'intervention - "fk_user_author" integer, -- createur de la fiche - "fk_user_valid" integer, -- valideur de la fiche - "fk_statut" smallint DEFAULT 0, - "duree" real, -- durée totale de l'intervention - "description" text, - "note_private" text, - "note_public" text, - "model_pdf" varchar(50), - UNIQUE(ref) -); - -CREATE INDEX idx_llx_fichinter_ref ON llx_fichinter (ref); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2007 Rodolphe Quiedeville +-- +-- 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_fichinter.sql,v 1.12 2007/12/02 21:37:39 eldy Exp +-- =================================================================== + + +create table llx_fichinter +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer NOT NULL, + "fk_projet" integer DEFAULT 0, -- projet auquel est rattache la fiche + "fk_contrat" integer DEFAULT 0, -- contrat auquel est rattache la fiche + "ref" varchar(30) NOT NULL, -- number + "tms" timestamp, + "datec" timestamp, -- date de creation + "date_valid" timestamp, -- date de validation + "datei" date, -- date de livraison du bon d'intervention + "fk_user_author" integer, -- createur de la fiche + "fk_user_valid" integer, -- valideur de la fiche + "fk_statut" smallint DEFAULT 0, + "duree" real, -- durée totale de l'intervention + "description" text, + "note_private" text, + "note_public" text, + "model_pdf" varchar(50), + UNIQUE(ref) +); + +CREATE INDEX idx_llx_fichinter_ref ON llx_fichinter (ref); diff --git a/pgsql/tables/llx_fichinterdet.sql b/pgsql/tables/llx_fichinterdet.sql index c7c522b2a7f..41e6e54e247 100644 --- a/pgsql/tables/llx_fichinterdet.sql +++ b/pgsql/tables/llx_fichinterdet.sql @@ -1,35 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2002-2003 Rodolphe Quiedeville --- Copyright (C) 2005-2007 Regis Houssin --- --- 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_fichinterdet.sql,v 1.1 2007/09/01 15:03:48 hregis Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/pgsql/tables/llx_fichinterdet.sql,v $ --- =================================================================== - -create table llx_fichinterdet -( - rowid SERIAL PRIMARY KEY, - "fk_fichinter" integer, - "date" date, -- date de la ligne d'intervention - "description" text, -- description de la ligne d'intervention - "duree" integer, -- duree de la ligne d'intervention - "rang" integer DEFAULT 0 -- ordre affichage sur la fiche -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- Copyright (C) 2005-2007 Regis Houssin +-- +-- 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_fichinterdet.sql,v 1.3 2007/12/02 21:37:39 eldy Exp +-- =================================================================== + +create table llx_fichinterdet +( + rowid SERIAL PRIMARY KEY, + "fk_fichinter" integer, + "date" date, -- date de la ligne d'intervention + "description" text, -- description de la ligne d'intervention + "duree" integer, -- duree de la ligne d'intervention + "rang" integer DEFAULT 0 -- ordre affichage sur la fiche +); diff --git a/pgsql/tables/llx_fournisseur_ca.sql b/pgsql/tables/llx_fournisseur_ca.sql index fe8c2dbdf81..f46fdc69feb 100644 --- a/pgsql/tables/llx_fournisseur_ca.sql +++ b/pgsql/tables/llx_fournisseur_ca.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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.4 2007/12/02 21:37:39 eldy Exp +-- ============================================================================ + +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); diff --git a/pgsql/tables/llx_groupesociete.sql b/pgsql/tables/llx_groupesociete.sql index 1a71e5d6903..e1f321aa30d 100644 --- a/pgsql/tables/llx_groupesociete.sql +++ b/pgsql/tables/llx_groupesociete.sql @@ -1,39 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2000-2004 Rodolphe Quiedeville --- --- 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_groupesociete -( - rowid SERIAL PRIMARY KEY, - "parent" integer UNIQUE, - "tms" timestamp, - "datec" timestamp, -- creation date - "nom" varchar(60), -- company name - "note" text, -- - "remise" real DEFAULT 0, -- remise systématique pour le client - "fk_user_author" integer -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2000-2004 Rodolphe Quiedeville +-- +-- 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_groupesociete.sql,v 1.3 2007/12/02 21:37:39 eldy Exp +-- ======================================================================== + + +create table llx_groupesociete +( + rowid SERIAL PRIMARY KEY, + "parent" integer UNIQUE, + "tms" timestamp, + "datec" timestamp, -- creation date + "nom" varchar(60), -- company name + "note" text, -- + "remise" real DEFAULT 0, -- remise systématique pour le client + "fk_user_author" integer +); + diff --git a/pgsql/tables/llx_groupesociete_remise.sql b/pgsql/tables/llx_groupesociete_remise.sql index 5afb66b959c..bf8647664d2 100644 --- a/pgsql/tables/llx_groupesociete_remise.sql +++ b/pgsql/tables/llx_groupesociete_remise.sql @@ -1,40 +1,38 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2000-2004 Rodolphe Quiedeville --- --- 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$ --- --- Historique des remises au groupes de societes --- --- ======================================================================== - - -create table llx_groupesociete_remise -( - rowid SERIAL PRIMARY KEY, - "fk_groupe" integer NOT NULL, - "tms" timestamp, - "datec" timestamp, -- creation date - "fk_user_author" integer, -- utilisateur qui a créé l'info - "remise" real DEFAULT 0, -- remise systématique pour le client - "note" text -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2000-2004 Rodolphe Quiedeville +-- +-- 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_groupesociete_remise.sql,v 1.3 2007/12/02 21:37:39 eldy Exp +-- +-- Historique des remises au groupes de societes +-- ======================================================================== + + +create table llx_groupesociete_remise +( + rowid SERIAL PRIMARY KEY, + "fk_groupe" integer NOT NULL, + "tms" timestamp, + "datec" timestamp, -- creation date + "fk_user_author" integer, -- utilisateur qui a créé l'info + "remise" real DEFAULT 0, -- remise systématique pour le client + "note" text +); + diff --git a/pgsql/tables/llx_livraison.sql b/pgsql/tables/llx_livraison.sql index 79053178999..09951ba5409 100644 --- a/pgsql/tables/llx_livraison.sql +++ b/pgsql/tables/llx_livraison.sql @@ -1,51 +1,49 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_livraison -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "fk_commande" integer DEFAULT 0, -- commande 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 - "date_creation" timestamp, -- date de creation - "date_valid" timestamp, -- date de validation - "fk_user_author" integer, -- createur du bon de livraison - "fk_user_valid" integer, -- valideur du bon de livraison - "fk_statut" smallint default 0, - "total_ht" real default 0, - "total_ttc" real default 0, - "note" text, - "note_public" text, - "model_pdf" varchar(50), - "date_livraison" date default NULL, - "fk_adresse_livraison" integer, -- adresse de livraison - UNIQUE(ref) -); - -CREATE INDEX idx_llx_livraison_ref ON llx_livraison (ref); -CREATE INDEX idx_llx_livraison_fk_commande ON llx_livraison (fk_commande); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_livraison.sql,v 1.6 2007/12/02 21:37:40 eldy Exp +-- =================================================================== + + +create table llx_livraison +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "fk_commande" integer DEFAULT 0, -- commande 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 + "date_creation" timestamp, -- date de creation + "date_valid" timestamp, -- date de validation + "fk_user_author" integer, -- createur du bon de livraison + "fk_user_valid" integer, -- valideur du bon de livraison + "fk_statut" smallint default 0, + "total_ht" real default 0, + "total_ttc" real default 0, + "note" text, + "note_public" text, + "model_pdf" varchar(50), + "date_livraison" date default NULL, + "fk_adresse_livraison" integer, -- adresse de livraison + UNIQUE(ref) +); + +CREATE INDEX idx_llx_livraison_ref ON llx_livraison (ref); +CREATE INDEX idx_llx_livraison_fk_commande ON llx_livraison (fk_commande); diff --git a/pgsql/tables/llx_livraisondet.sql b/pgsql/tables/llx_livraisondet.sql index b67d3fee8ea..b6cbbf656d7 100644 --- a/pgsql/tables/llx_livraisondet.sql +++ b/pgsql/tables/llx_livraisondet.sql @@ -1,35 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_livraisondet -( - rowid SERIAL PRIMARY KEY, - "fk_livraison" integer, - "fk_commande_ligne" integer NOT NULL, - "qty" real -- quantité -); - -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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_livraisondet.sql,v 1.3 2007/12/02 21:37:40 eldy Exp +-- =================================================================== + +create table llx_livraisondet +( + rowid SERIAL PRIMARY KEY, + "fk_livraison" integer, + "fk_commande_ligne" integer NOT NULL, + "qty" real -- quantité +); + +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); diff --git a/pgsql/tables/llx_mailing.sql b/pgsql/tables/llx_mailing.sql index 82544f54eec..804af3f1814 100644 --- a/pgsql/tables/llx_mailing.sql +++ b/pgsql/tables/llx_mailing.sql @@ -1,59 +1,58 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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$ --- --- ======================================================================== --- --- redaction : 0 --- valide : 1 --- approuvé : 2 --- envoye : 3 - - - - - - - - -create table llx_mailing -( - rowid SERIAL PRIMARY KEY, - "statut" smallint DEFAULT 0, -- - "titre" varchar(60), -- company name - "sujet" varchar(60), -- company name - "body" text, - "cible" varchar(60), - "nbemail" integer, - "email_from" varchar(160), -- company name - "email_replyto" varchar(160), -- company name - "email_errorsto" varchar(160), -- company name - "date_creat" timestamp, -- creation date - "date_valid" timestamp, -- - "date_appro" timestamp, -- - "date_envoi" timestamp, -- date d'envoi - "fk_user_creat" integer, -- utilisateur qui a créé l'info - "fk_user_valid" integer, -- utilisateur qui a créé l'info - "fk_user_appro" integer -- utilisateur qui a créé l'info -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_mailing.sql,v 1.3 2007/12/02 21:37:40 eldy Exp +-- ======================================================================== + + +-- redaction : 0 +-- valide : 1 +-- approuvé : 2 +-- envoye : 3 + + + + + + + + +create table llx_mailing +( + rowid SERIAL PRIMARY KEY, + "statut" smallint DEFAULT 0, -- + "titre" varchar(60), -- company name + "sujet" varchar(60), -- company name + "body" text, + "cible" varchar(60), + "nbemail" integer, + "email_from" varchar(160), -- company name + "email_replyto" varchar(160), -- company name + "email_errorsto" varchar(160), -- company name + "date_creat" timestamp, -- creation date + "date_valid" timestamp, -- + "date_appro" timestamp, -- + "date_envoi" timestamp, -- date d'envoi + "fk_user_creat" integer, -- utilisateur qui a créé l'info + "fk_user_valid" integer, -- utilisateur qui a créé l'info + "fk_user_appro" integer -- utilisateur qui a créé l'info +); + diff --git a/pgsql/tables/llx_mailing_cibles.key.sql b/pgsql/tables/llx_mailing_cibles.key.sql index b04e114b5b4..dfc37e0d42c 100644 --- a/pgsql/tables/llx_mailing_cibles.key.sql +++ b/pgsql/tables/llx_mailing_cibles.key.sql @@ -1,28 +1,26 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- =================================================================== - - -ALTER TABLE llx_mailing_cibles ADD UNIQUE uk_mailing_cibles (fk_mailing, email); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_mailing_cibles.key.sql,v 1.2 2007/12/02 21:37:40 eldy Exp +-- =================================================================== + + +ALTER TABLE llx_mailing_cibles ADD UNIQUE uk_mailing_cibles (fk_mailing, email); diff --git a/pgsql/tables/llx_mailing_cibles.sql b/pgsql/tables/llx_mailing_cibles.sql index fd0cc77b94b..796cc21d68f 100644 --- a/pgsql/tables/llx_mailing_cibles.sql +++ b/pgsql/tables/llx_mailing_cibles.sql @@ -1,41 +1,38 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_mailing_cibles -( - rowid SERIAL PRIMARY KEY, - "fk_mailing" integer NOT NULL, - "fk_contact" integer NOT NULL, - "nom" varchar(160), - "prenom" varchar(160), - "email" varchar(160) NOT NULL, - "statut" smallint NOT NULL DEFAULT 0, - "url" varchar(160), - "date_envoi" timestamp -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_mailing_cibles.sql,v 1.5 2007/12/02 21:37:40 eldy Exp +-- ======================================================================== + + +create table llx_mailing_cibles +( + rowid SERIAL PRIMARY KEY, + "fk_mailing" integer NOT NULL, + "fk_contact" integer NOT NULL, + "nom" varchar(160), + "prenom" varchar(160), + "email" varchar(160) NOT NULL, + "statut" smallint NOT NULL DEFAULT 0, + "url" varchar(160), + "date_envoi" timestamp +); + diff --git a/pgsql/tables/llx_menu.sql b/pgsql/tables/llx_menu.sql index b90fdab0aba..68434e6b507 100644 --- a/pgsql/tables/llx_menu.sql +++ b/pgsql/tables/llx_menu.sql @@ -1,50 +1,49 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2007 Laurent Destailleur --- --- 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; +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2007 Patrick Raguin +-- Copyright (C) 2007 Laurent Destailleur +-- +-- 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 +-- ======================================================================== + + +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; diff --git a/pgsql/tables/llx_menu_const.key.sql b/pgsql/tables/llx_menu_const.key.sql index 33846ae81c0..5829dea5c4f 100644 --- a/pgsql/tables/llx_menu_const.key.sql +++ b/pgsql/tables/llx_menu_const.key.sql @@ -1,33 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2005 Laurent Destailleur --- --- 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`); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2007 Patrick Raguin +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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 +-- ======================================================================== + + +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`); diff --git a/pgsql/tables/llx_menu_const.sql b/pgsql/tables/llx_menu_const.sql index de2996aa960..c0ffe6a09c5 100644 --- a/pgsql/tables/llx_menu_const.sql +++ b/pgsql/tables/llx_menu_const.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2007 Patrick Raguin --- --- 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; - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2007 Patrick Raguin +-- +-- 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 +-- ======================================================================== + + +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; + diff --git a/pgsql/tables/llx_menu_constraint.sql b/pgsql/tables/llx_menu_constraint.sql index 4bf263e0154..b0a065bf03a 100644 --- a/pgsql/tables/llx_menu_constraint.sql +++ b/pgsql/tables/llx_menu_constraint.sql @@ -1,32 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2007 Patrick Raguin --- --- 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; +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2007 Patrick Raguin +-- +-- 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 +-- ======================================================================== + + +CREATE TABLE `llx_menu_constraint` ( + `rowid` int(11) NOT NULL, + `action` varchar(255) NOT NULL, + PRIMARY KEY (`rowid`) +) type=innodb; diff --git a/pgsql/tables/llx_notify.sql b/pgsql/tables/llx_notify.sql index 836c75347c6..c497b488289 100644 --- a/pgsql/tables/llx_notify.sql +++ b/pgsql/tables/llx_notify.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_notify -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "daten" timestamp, -- date de la notification - "fk_action" integer NOT NULL, - "fk_contact" integer NOT NULL, - "objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale')) , - "objet_id" integer NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_notify.sql,v 1.4 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + +create table llx_notify +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "daten" timestamp, -- date de la notification + "fk_action" integer NOT NULL, + "fk_contact" integer NOT NULL, + "objet_type" varchar(10) CHECK (objet_type IN ('ficheinter','facture','propale')) , + "objet_id" integer NOT NULL +); diff --git a/pgsql/tables/llx_notify_def.sql b/pgsql/tables/llx_notify_def.sql index 61ccd998352..8582f3f1d3a 100644 --- a/pgsql/tables/llx_notify_def.sql +++ b/pgsql/tables/llx_notify_def.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_notify_def -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "datec" date, -- date de creation - "fk_action" integer NOT NULL, - "fk_soc" integer NOT NULL, - "fk_contact" integer NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_notify_def.sql,v 1.4 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + +create table llx_notify_def +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "datec" date, -- date de creation + "fk_action" integer NOT NULL, + "fk_soc" integer NOT NULL, + "fk_contact" integer NOT NULL +); diff --git a/pgsql/tables/llx_osc_categories.sql b/pgsql/tables/llx_osc_categories.sql index 949463833ca..3d4dd5f46b6 100644 --- a/pgsql/tables/llx_osc_categories.sql +++ b/pgsql/tables/llx_osc_categories.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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_categories.sql,v 1.3 2007/08/26 19:21:40 eldy Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_osc_categories.sql,v $ --- --- =================================================================== - -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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_categories.sql,v 1.4 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + +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); diff --git a/pgsql/tables/llx_osc_customer.key.sql b/pgsql/tables/llx_osc_customer.key.sql index 8debb2ffa1b..87660216232 100644 --- a/pgsql/tables/llx_osc_customer.key.sql +++ b/pgsql/tables/llx_osc_customer.key.sql @@ -1,28 +1,26 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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.3 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + + +ALTER TABLE llx_osc_customer ADD CONSTRAINT fk_osc_customer_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); diff --git a/pgsql/tables/llx_osc_customer.sql b/pgsql/tables/llx_osc_customer.sql index 534964a22f5..9ea478589f9 100644 --- a/pgsql/tables/llx_osc_customer.sql +++ b/pgsql/tables/llx_osc_customer.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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.3 2007/08/26 19:21:40 eldy Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_osc_customer.sql,v $ --- --- =================================================================== - -CREATE TABLE llx_osc_customer ( - "rowid" int4 NOT NULL default '0', - "datem" timestamp default NULL, - "fk_soc" int4 NOT NULL default '0', - UNIQUE(fk_soc) -) TYPE=InnoDB COMMENT='Table transition client OSC - societe Dolibarr'; - -CREATE INDEX idx_llx_osc_customer_rowid ON llx_osc_customer (rowid); -CREATE INDEX fk_soc ON llx_osc_customer (fk_soc); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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.4 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + +CREATE TABLE llx_osc_customer ( + "rowid" int4 NOT NULL default '0', + "datem" timestamp default NULL, + "fk_soc" int4 NOT NULL default '0', + UNIQUE(fk_soc) +) TYPE=InnoDB COMMENT='Table transition client OSC - societe Dolibarr'; + +CREATE INDEX idx_llx_osc_customer_rowid ON llx_osc_customer (rowid); +CREATE INDEX fk_soc ON llx_osc_customer (fk_soc); diff --git a/pgsql/tables/llx_osc_order.sql b/pgsql/tables/llx_osc_order.sql index e7f96c759df..b2dfd2490ae 100644 --- a/pgsql/tables/llx_osc_order.sql +++ b/pgsql/tables/llx_osc_order.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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.4 2007/08/26 19:21:40 eldy Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_osc_order.sql,v $ --- --- =================================================================== - -CREATE TABLE llx_osc_order ( - "rowid" int4 NOT NULL default '0', - "datem" timestamp default NULL, - "fk_commande" int4 NOT NULL default '0', - UNIQUE(fk_commande) -) TYPE=InnoDB COMMENT='Table transition commande OSC - commande Dolibarr'; - -CREATE INDEX idx_llx_osc_order_rowid ON llx_osc_order (rowid); -CREATE INDEX fk_commande ON llx_osc_order (fk_commande); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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.5 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + +CREATE TABLE llx_osc_order ( + "rowid" int4 NOT NULL default '0', + "datem" timestamp default NULL, + "fk_commande" int4 NOT NULL default '0', + UNIQUE(fk_commande) +) TYPE=InnoDB COMMENT='Table transition commande OSC - commande Dolibarr'; + +CREATE INDEX idx_llx_osc_order_rowid ON llx_osc_order (rowid); +CREATE INDEX fk_commande ON llx_osc_order (fk_commande); diff --git a/pgsql/tables/llx_osc_product.sql b/pgsql/tables/llx_osc_product.sql index b367997dfd2..812974ac610 100644 --- a/pgsql/tables/llx_osc_product.sql +++ b/pgsql/tables/llx_osc_product.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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_product.sql,v 1.4 2007/08/26 19:21:41 eldy Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_osc_product.sql,v $ --- --- =================================================================== - -CREATE TABLE llx_osc_product ( - "rowid" int4 NOT NULL default '0', - "datem" timestamp default NULL, - "fk_product" int4 NOT NULL default '0', - UNIQUE(fk_product) -) TYPE=InnoDB COMMENT='Table transition produit OSC - produit Dolibarr'; - -CREATE INDEX idx_llx_osc_product_rowid ON llx_osc_product (rowid); -CREATE INDEX fk_product ON llx_osc_product (fk_product); - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_product.sql,v 1.5 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + +CREATE TABLE llx_osc_product ( + "rowid" int4 NOT NULL default '0', + "datem" timestamp default NULL, + "fk_product" int4 NOT NULL default '0', + UNIQUE(fk_product) +) TYPE=InnoDB COMMENT='Table transition produit OSC - produit Dolibarr'; + +CREATE INDEX idx_llx_osc_product_rowid ON llx_osc_product (rowid); +CREATE INDEX fk_product ON llx_osc_product (fk_product); + + diff --git a/pgsql/tables/llx_paiement.sql b/pgsql/tables/llx_paiement.sql index 5636a5e99e8..d6dceaedb76 100644 --- a/pgsql/tables/llx_paiement.sql +++ b/pgsql/tables/llx_paiement.sql @@ -1,48 +1,47 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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$ --- =================================================================== --- --- --- Satut, 0 ou 1, 1 n'est plus supprimable --- fk_export_compta 0 pas exporté - - -create table llx_paiement -( - rowid SERIAL PRIMARY KEY, - "fk_facture" integer, - "datec" timestamp, -- date de creation - "tms" timestamp, - "datep" timestamp, -- payment date - "amount" real DEFAULT 0, - "fk_paiement" integer NOT NULL, - "num_paiement" varchar(50), - "note" text, - "fk_bank" integer NOT NULL, - "fk_user_creat" integer, -- utilisateur qui a créé l'info - "fk_user_modif" integer, -- utilisateur qui a modifié l'info - "statut" smallint DEFAULT 0 NOT NULL, - "fk_export_compta" integer DEFAULT 0 NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_paiement.sql,v 1.13 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + + +-- Satut, 0 ou 1, 1 n'est plus supprimable +-- fk_export_compta 0 pas exporté + + +create table llx_paiement +( + rowid SERIAL PRIMARY KEY, + "fk_facture" integer, + "datec" timestamp, -- date de creation + "tms" timestamp, + "datep" timestamp, -- payment date + "amount" real DEFAULT 0, + "fk_paiement" integer NOT NULL, + "num_paiement" varchar(50), + "note" text, + "fk_bank" integer NOT NULL, + "fk_user_creat" integer, -- utilisateur qui a créé l'info + "fk_user_modif" integer, -- utilisateur qui a modifié l'info + "statut" smallint DEFAULT 0 NOT NULL, + "fk_export_compta" integer DEFAULT 0 NOT NULL +); diff --git a/pgsql/tables/llx_paiement_facture.key.sql b/pgsql/tables/llx_paiement_facture.key.sql index e00fa53e1ca..9b6fae72621 100644 --- a/pgsql/tables/llx_paiement_facture.key.sql +++ b/pgsql/tables/llx_paiement_facture.key.sql @@ -1,35 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- =========================================================================== - --- Supprimme orhpelins pour permettre montée de la clé --- V4 DELETE llx_paiement_facture FROM llx_paiement_facture LEFT JOIN llx_facture ON llx_paiement_facture.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL; --- V4 DELETE llx_paiement_facture FROM llx_paiement_facture LEFT JOIn llx_paiement ON llx_paiement_facture.fk_facture = llx_paiement.rowid WHERE llx_paiement.rowid IS NULL; - -ALTER TABLE llx_paiement_facture ADD INDEX idx_paiement_facture_fk_facture (fk_facture); -ALTER TABLE llx_paiement_facture ADD CONSTRAINT fk_paiement_facture_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); - -ALTER TABLE llx_paiement_facture ADD INDEX idx_paiement_facture_fk_paiement (fk_paiement); -ALTER TABLE llx_paiement_facture ADD CONSTRAINT fk_paiement_facture_fk_paiement FOREIGN KEY (fk_paiement) REFERENCES llx_paiement (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_paiement_facture.key.sql,v 1.5 2007/12/02 21:37:41 eldy Exp +-- =========================================================================== + + +-- Supprimme orhpelins pour permettre montée de la clé +-- V4 DELETE llx_paiement_facture FROM llx_paiement_facture LEFT JOIN llx_facture ON llx_paiement_facture.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL; +-- V4 DELETE llx_paiement_facture FROM llx_paiement_facture LEFT JOIn llx_paiement ON llx_paiement_facture.fk_facture = llx_paiement.rowid WHERE llx_paiement.rowid IS NULL; + +ALTER TABLE llx_paiement_facture ADD INDEX idx_paiement_facture_fk_facture (fk_facture); +ALTER TABLE llx_paiement_facture ADD CONSTRAINT fk_paiement_facture_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); + +ALTER TABLE llx_paiement_facture ADD INDEX idx_paiement_facture_fk_paiement (fk_paiement); +ALTER TABLE llx_paiement_facture ADD CONSTRAINT fk_paiement_facture_fk_paiement FOREIGN KEY (fk_paiement) REFERENCES llx_paiement (rowid); diff --git a/pgsql/tables/llx_paiement_facture.sql b/pgsql/tables/llx_paiement_facture.sql index 36ba5efa29f..ccf983532c1 100644 --- a/pgsql/tables/llx_paiement_facture.sql +++ b/pgsql/tables/llx_paiement_facture.sql @@ -1,32 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville --- --- 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_paiement_facture -( - rowid SERIAL PRIMARY KEY, - "fk_paiement" integer, - "fk_facture" integer, - "amount" real DEFAULT 0 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- 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_paiement_facture.sql,v 1.9 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + +create table llx_paiement_facture +( + rowid SERIAL PRIMARY KEY, + "fk_paiement" integer, + "fk_facture" integer, + "amount" real DEFAULT 0 +); diff --git a/pgsql/tables/llx_paiementcharge.sql b/pgsql/tables/llx_paiementcharge.sql index cfb2f6175d6..79ca2f97ddc 100644 --- a/pgsql/tables/llx_paiementcharge.sql +++ b/pgsql/tables/llx_paiementcharge.sql @@ -1,41 +1,40 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2004 Laurent Destailleur --- --- 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_paiementcharge -( - rowid SERIAL PRIMARY KEY, - "fk_charge" integer, - "datec" timestamp, -- date de creation - "tms" timestamp, - "datep" timestamp, -- payment date - "amount" real DEFAULT 0, - "fk_typepaiement" integer NOT NULL, - "num_paiement" varchar(50), - "note" text, - "fk_bank" integer NOT NULL, - "fk_user_creat" integer, -- utilisateur qui a créé l'info - "fk_user_modif" integer -- utilisateur qui a modifié l'info -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_paiementcharge.sql,v 1.3 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + + +create table llx_paiementcharge +( + rowid SERIAL PRIMARY KEY, + "fk_charge" integer, + "datec" timestamp, -- date de creation + "tms" timestamp, + "datep" timestamp, -- payment date + "amount" real DEFAULT 0, + "fk_typepaiement" integer NOT NULL, + "num_paiement" varchar(50), + "note" text, + "fk_bank" integer NOT NULL, + "fk_user_creat" integer, -- utilisateur qui a créé l'info + "fk_user_modif" integer -- utilisateur qui a modifié l'info +); diff --git a/pgsql/tables/llx_paiementfourn.sql b/pgsql/tables/llx_paiementfourn.sql index 278c23594b5..96f81d1db21 100644 --- a/pgsql/tables/llx_paiementfourn.sql +++ b/pgsql/tables/llx_paiementfourn.sql @@ -1,41 +1,40 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2003-2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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_paiementfourn -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "datec" timestamp, -- date de creation de l'enregistrement - "fk_facture_fourn" integer, -- facture - "datep" timestamp, -- date de paiement - "amount" real DEFAULT 0, -- montant - "fk_user_author" integer, -- auteur - "fk_paiement" integer NOT NULL, -- moyen de paiement - "num_paiement" varchar(50), -- numéro de paiement (cheque) - "note" text, - "fk_bank" integer NOT NULL, - "statut" int2 NOT NULL DEFAULT 0 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2003-2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_paiementfourn.sql,v 1.8 2007/12/02 21:37:41 eldy Exp +-- =================================================================== + +create table llx_paiementfourn +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "datec" timestamp, -- date de creation de l'enregistrement + "fk_facture_fourn" integer, -- facture + "datep" timestamp, -- date de paiement + "amount" real DEFAULT 0, -- montant + "fk_user_author" integer, -- auteur + "fk_paiement" integer NOT NULL, -- moyen de paiement + "num_paiement" varchar(50), -- numéro de paiement (cheque) + "note" text, + "fk_bank" integer NOT NULL, + "statut" int2 NOT NULL DEFAULT 0 +); diff --git a/pgsql/tables/llx_paiementfourn_facturefourn.key.sql b/pgsql/tables/llx_paiementfourn_facturefourn.key.sql index 978f1fd9993..4e19f4365f4 100644 --- a/pgsql/tables/llx_paiementfourn_facturefourn.key.sql +++ b/pgsql/tables/llx_paiementfourn_facturefourn.key.sql @@ -1,29 +1,28 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2005 Marc Barilley / Océbo --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- =========================================================================== - -ALTER TABLE llx_paiementfourn_facturefourn ADD INDEX idx_paiementfourn_facturefourn_fk_facture(fk_facturefourn); -ALTER TABLE llx_paiementfourn_facturefourn ADD INDEX idx_paiementfourn_facturefourn_fk_paiement(fk_paiementfourn); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2005 Marc Barilley / Océbo +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_paiementfourn_facturefourn.key.sql,v 1.3 2007/12/02 21:37:42 eldy Exp +-- =========================================================================== + +ALTER TABLE llx_paiementfourn_facturefourn ADD INDEX idx_paiementfourn_facturefourn_fk_facture(fk_facturefourn); +ALTER TABLE llx_paiementfourn_facturefourn ADD INDEX idx_paiementfourn_facturefourn_fk_paiement(fk_paiementfourn); diff --git a/pgsql/tables/llx_paiementfourn_facturefourn.sql b/pgsql/tables/llx_paiementfourn_facturefourn.sql index be02ce0dd91..0056ed10852 100644 --- a/pgsql/tables/llx_paiementfourn_facturefourn.sql +++ b/pgsql/tables/llx_paiementfourn_facturefourn.sql @@ -1,34 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2005 Marc Barilley / Océbo --- Copyright (C) 2005 Laurent Destailleur --- --- 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_paiementfourn_facturefourn -( - rowid SERIAL PRIMARY KEY, - "fk_paiementfourn" INT(11) DEFAULT NULL, - "fk_facturefourn" INT(11) DEFAULT NULL, - "amount" real DEFAULT '0' +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2005 Marc Barilley / Océbo +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_paiementfourn_facturefourn.sql,v 1.4 2007/12/02 21:37:42 eldy Exp +-- =========================================================================== + +create table llx_paiementfourn_facturefourn +( + rowid SERIAL PRIMARY KEY, + "fk_paiementfourn" INT(11) DEFAULT NULL, + "fk_facturefourn" INT(11) DEFAULT NULL, + "amount" real DEFAULT '0' ); \ No newline at end of file diff --git a/pgsql/tables/llx_prelevement_bons.sql b/pgsql/tables/llx_prelevement_bons.sql index c2ec37eb54b..111b0464331 100644 --- a/pgsql/tables/llx_prelevement_bons.sql +++ b/pgsql/tables/llx_prelevement_bons.sql @@ -1,49 +1,49 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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$ --- =================================================================== --- --- Bons de prélèvement --- --- statut 1 : transmis à la banque --- statut 2 : credite --- -create table llx_prelevement_bons -( - rowid SERIAL PRIMARY KEY, - "ref" varchar(12), -- reference - "datec" timestamp, -- date de creation - "amount" real DEFAULT 0, -- montant total du prélèvement - "statut" smallint DEFAULT 0, -- statut - "credite" smallint DEFAULT 0, -- indique si le prelevement a été credité - "note" text, - "date_trans" timestamp, -- date de transmission à la banque - "method_trans" smallint, -- méthode de transmission - "fk_user_trans" integer, -- user qui a effectué la transmission - "date_credit" timestamp, -- date de crédit sur le compte - "fk_user_credit" integer, -- user qui a remonté l'info de crédit - - UNIQUE(ref) -); - -CREATE INDEX idx_llx_prelevement_bons_ref ON llx_prelevement_bons (ref); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_prelevement_bons.sql,v 1.2 2007/12/02 21:37:42 eldy Exp +-- =================================================================== + +-- +-- Bons de prélèvement +-- +-- statut 1 : transmis à la banque +-- statut 2 : credite +-- +create table llx_prelevement_bons +( + rowid SERIAL PRIMARY KEY, + "ref" varchar(12), -- reference + "datec" timestamp, -- date de creation + "amount" real DEFAULT 0, -- montant total du prélèvement + "statut" smallint DEFAULT 0, -- statut + "credite" smallint DEFAULT 0, -- indique si le prelevement a été credité + "note" text, + "date_trans" timestamp, -- date de transmission à la banque + "method_trans" smallint, -- méthode de transmission + "fk_user_trans" integer, -- user qui a effectué la transmission + "date_credit" timestamp, -- date de crédit sur le compte + "fk_user_credit" integer, -- user qui a remonté l'info de crédit + + UNIQUE(ref) +); + +CREATE INDEX idx_llx_prelevement_bons_ref ON llx_prelevement_bons (ref); diff --git a/pgsql/tables/llx_prelevement_facture.key.sql b/pgsql/tables/llx_prelevement_facture.key.sql index 85490a2abd2..085ef9b0055 100644 --- a/pgsql/tables/llx_prelevement_facture.key.sql +++ b/pgsql/tables/llx_prelevement_facture.key.sql @@ -1,33 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Rodolphe Quiedeville --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -ALTER TABLE llx_prelevement_facture ADD INDEX idx_prelevement_facture_fk_prelevement_lignes (fk_prelevement_lignes); - - -ALTER TABLE llx_prelevement_facture ADD CONSTRAINT fk_prelevement_facture_fk_prelevement_lignes FOREIGN KEY (fk_prelevement_lignes) REFERENCES llx_prelevement_lignes (rowid); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Rodolphe Quiedeville +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_prelevement_facture.key.sql,v 1.4 2007/12/02 21:37:42 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_prelevement_facture ADD INDEX idx_prelevement_facture_fk_prelevement_lignes (fk_prelevement_lignes); + + +ALTER TABLE llx_prelevement_facture ADD CONSTRAINT fk_prelevement_facture_fk_prelevement_lignes FOREIGN KEY (fk_prelevement_lignes) REFERENCES llx_prelevement_lignes (rowid); + diff --git a/pgsql/tables/llx_prelevement_facture.sql b/pgsql/tables/llx_prelevement_facture.sql index 993a8223f3a..3e77de1d2f2 100644 --- a/pgsql/tables/llx_prelevement_facture.sql +++ b/pgsql/tables/llx_prelevement_facture.sql @@ -1,34 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_prelevement_facture -( - rowid SERIAL PRIMARY KEY, - "fk_facture" integer NOT NULL, - "fk_prelevement_lignes" integer NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_prelevement_facture.sql,v 1.5 2007/12/02 21:37:42 eldy Exp +-- =================================================================== + + +create table llx_prelevement_facture +( + rowid SERIAL PRIMARY KEY, + "fk_facture" integer NOT NULL, + "fk_prelevement_lignes" integer NOT NULL +); diff --git a/pgsql/tables/llx_prelevement_facture_demande.sql b/pgsql/tables/llx_prelevement_facture_demande.sql index 90c7014a34f..66c93c5d803 100644 --- a/pgsql/tables/llx_prelevement_facture_demande.sql +++ b/pgsql/tables/llx_prelevement_facture_demande.sql @@ -1,44 +1,42 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_prelevement_facture_demande -( - rowid SERIAL PRIMARY KEY, - "fk_facture" integer NOT NULL, - "amount" real NOT NULL, - "date_demande" timestamp, - "traite" smallint DEFAULT 0, - "date_traite" timestamp, - "fk_prelevement_bons" integer, - "fk_user_demande" integer NOT NULL, - "code_banque" varchar(7), - "code_guichet" varchar(6), - "number" varchar(255), - "cle_rib" varchar(5) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_prelevement_facture_demande.sql,v 1.5 2007/12/02 21:37:42 eldy Exp +-- =================================================================== + + + + +create table llx_prelevement_facture_demande +( + rowid SERIAL PRIMARY KEY, + "fk_facture" integer NOT NULL, + "amount" real NOT NULL, + "date_demande" timestamp, + "traite" smallint DEFAULT 0, + "date_traite" timestamp, + "fk_prelevement_bons" integer, + "fk_user_demande" integer NOT NULL, + "code_banque" varchar(7), + "code_guichet" varchar(6), + "number" varchar(255), + "cle_rib" varchar(5) +); diff --git a/pgsql/tables/llx_prelevement_lignes.key.sql b/pgsql/tables/llx_prelevement_lignes.key.sql index 9acc1e752f3..e2b97454e60 100644 --- a/pgsql/tables/llx_prelevement_lignes.key.sql +++ b/pgsql/tables/llx_prelevement_lignes.key.sql @@ -1,33 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Rodolphe Quiedeville --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -ALTER TABLE llx_prelevement_lignes ADD INDEX idx_prelevement_lignes_fk_prelevement_bons (fk_prelevement_bons); - - -ALTER TABLE llx_prelevement_lignes ADD CONSTRAINT fk_prelevement_lignes_fk_prelevement_bons FOREIGN KEY (fk_prelevement_bons) REFERENCES llx_prelevement_bons (rowid); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Rodolphe Quiedeville +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_prelevement_lignes.key.sql,v 1.4 2007/12/02 21:37:43 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_prelevement_lignes ADD INDEX idx_prelevement_lignes_fk_prelevement_bons (fk_prelevement_bons); + + +ALTER TABLE llx_prelevement_lignes ADD CONSTRAINT fk_prelevement_lignes_fk_prelevement_bons FOREIGN KEY (fk_prelevement_bons) REFERENCES llx_prelevement_bons (rowid); + diff --git a/pgsql/tables/llx_prelevement_lignes.sql b/pgsql/tables/llx_prelevement_lignes.sql index 8a9b483351c..bc70ebf4efc 100644 --- a/pgsql/tables/llx_prelevement_lignes.sql +++ b/pgsql/tables/llx_prelevement_lignes.sql @@ -1,44 +1,41 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_prelevement_lignes -( - rowid SERIAL PRIMARY KEY, - "fk_prelevement_bons" integer, - "fk_soc" integer NOT NULL, - "statut" smallint DEFAULT 0, - "client_nom" varchar(255), - "amount" real DEFAULT 0, - "code_banque" varchar(7), - "code_guichet" varchar(6), - "number" varchar(255), - "cle_rib" varchar(5), - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_prelevement_lignes.sql,v 1.2 2007/12/02 21:37:43 eldy Exp +-- =================================================================== + + + + +create table llx_prelevement_lignes +( + rowid SERIAL PRIMARY KEY, + "fk_prelevement_bons" integer, + "fk_soc" integer NOT NULL, + "statut" smallint DEFAULT 0, + "client_nom" varchar(255), + "amount" real DEFAULT 0, + "code_banque" varchar(7), + "code_guichet" varchar(6), + "number" varchar(255), + "cle_rib" varchar(5), + "note" text +); diff --git a/pgsql/tables/llx_prelevement_notifications.sql b/pgsql/tables/llx_prelevement_notifications.sql index 13f6f5b68b6..a7e38bec485 100644 --- a/pgsql/tables/llx_prelevement_notifications.sql +++ b/pgsql/tables/llx_prelevement_notifications.sql @@ -1,39 +1,39 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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$ --- =================================================================== --- --- Utilisateur a notifier --- --- actions : --- 'em' emission d'un bon --- 'tr' tranmission d'un bon --- 'cr' credit du bon par la banque - - -create table llx_prelevement_notifications -( - rowid SERIAL PRIMARY KEY, - "fk_user" integer NOT NULL, - "action" varchar(2) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_prelevement_notifications.sql,v 1.2 2007/12/02 21:37:43 eldy Exp +-- =================================================================== + +-- +-- Utilisateur a notifier +-- +-- actions : +-- 'em' emission d'un bon +-- 'tr' tranmission d'un bon +-- 'cr' credit du bon par la banque + + +create table llx_prelevement_notifications +( + rowid SERIAL PRIMARY KEY, + "fk_user" integer NOT NULL, + "action" varchar(2) +); diff --git a/pgsql/tables/llx_prelevement_rejet.sql b/pgsql/tables/llx_prelevement_rejet.sql index 947e7a5e8a5..838c34df839 100644 --- a/pgsql/tables/llx_prelevement_rejet.sql +++ b/pgsql/tables/llx_prelevement_rejet.sql @@ -1,39 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_prelevement_rejet -( - rowid SERIAL PRIMARY KEY, - "fk_prelevement_lignes" integer, - "date_rejet" timestamp, - "motif" integer, - "date_creation" timestamp, - "fk_user_creation" integer, - "note" text, - "afacturer" smallint default 0, - "fk_facture" integer -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_prelevement_rejet.sql,v 1.7 2007/12/02 21:37:43 eldy Exp +-- =================================================================== + +create table llx_prelevement_rejet +( + rowid SERIAL PRIMARY KEY, + "fk_prelevement_lignes" integer, + "date_rejet" timestamp, + "motif" integer, + "date_creation" timestamp, + "fk_user_creation" integer, + "note" text, + "afacturer" smallint default 0, + "fk_facture" integer +); diff --git a/pgsql/tables/llx_product.key.sql b/pgsql/tables/llx_product.key.sql index 31088df4ba8..85aa21f9917 100644 --- a/pgsql/tables/llx_product.key.sql +++ b/pgsql/tables/llx_product.key.sql @@ -1,30 +1,28 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2004 Rodolphe Quiedeville --- Copyright (C) 2004-2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -ALTER TABLE llx_product ADD UNIQUE uk_product_ref (ref); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Laurent Destailleur +-- +-- 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_product.key.sql,v 1.2 2007/12/02 21:37:43 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_product ADD UNIQUE uk_product_ref (ref); + diff --git a/pgsql/tables/llx_product.sql b/pgsql/tables/llx_product.sql index dc45261d442..17c030be093 100644 --- a/pgsql/tables/llx_product.sql +++ b/pgsql/tables/llx_product.sql @@ -1,55 +1,55 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2006 Rodolphe Quiedeville --- --- 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_product -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "ref" varchar(32) NOT NULL, - "label" varchar(255) NOT NULL, - "description" text, - "note" text, - "price" real(16,8), - "price_ttc" real(16,8) DEFAULT 0, - "price_base_type" varchar(3) DEFAULT 'HT', - "tva_tx" real(6,3), - "fk_user_author" integer, - "envente" smallint DEFAULT 1, - "nbvente" integer DEFAULT 0, - "fk_product_type" integer DEFAULT 0, - "duration" varchar(6), - "stock_propale" integer DEFAULT 0, - "stock_commande" integer DEFAULT 0, - "seuil_stock_alerte" integer DEFAULT 0, - "stock_loc" varchar(10), -- emplacement dans le stock - "gencode" varchar(255) DEFAULT NULL, - "weight" float DEFAULT NULL, - "weight_units" smallint DEFAULT NULL, - "volume" float DEFAULT NULL, - "volume_units" smallint DEFAULT NULL, - "canvas" varchar(15) DEFAULT '' -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2006 Rodolphe Quiedeville +-- +-- 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_product.sql,v 1.38 2007/12/02 21:37:44 eldy Exp +-- ============================================================================ + +create table llx_product +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "ref" varchar(32) NOT NULL, + "label" varchar(255) NOT NULL, + "description" text, + "note" text, + "price" real(24,8) DEFAULT 0, + "price_ttc" real(24,8) DEFAULT 0, + "price_base_type" varchar(3) DEFAULT 'HT', + "tva_tx" real(6,3), + "fk_user_author" integer, + "envente" smallint DEFAULT 1, + "nbvente" integer DEFAULT 0, + "fk_product_type" integer DEFAULT 0, + "duration" varchar(6), + "stock_propale" integer DEFAULT 0, + "stock_commande" integer DEFAULT 0, + "seuil_stock_alerte" integer DEFAULT 0, + "stock_loc" varchar(10), -- emplacement dans le stock + "barcode" varchar(255) DEFAULT NULL, + "fk_barcode_type" integer DEFAULT 0, + "partnumber" varchar(32), + "weight" float DEFAULT NULL, + "weight_units" smallint DEFAULT NULL, + "volume" float DEFAULT NULL, + "volume_units" smallint DEFAULT NULL, + "canvas" varchar(15) DEFAULT '' +); diff --git a/pgsql/tables/llx_product_ca.sql b/pgsql/tables/llx_product_ca.sql index 4aa9b9f4884..75e9be53ec9 100644 --- a/pgsql/tables/llx_product_ca.sql +++ b/pgsql/tables/llx_product_ca.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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_product_ca.sql,v 1.1 2006/12/09 21:49:55 rodolphe Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_product_ca.sql,v $ --- --- ============================================================================ - -create table llx_product_ca -( - "fk_product" integer, - "date_calcul" timestamp, - "year" smallint, - "ca_genere" float, - UNIQUE(fk_product, year) -); - -CREATE INDEX idx_llx_product_ca_fk_product_year ON llx_product_ca (fk_product, year); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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_product_ca.sql,v 1.2 2007/12/02 21:37:44 eldy Exp +-- ============================================================================ + +create table llx_product_ca +( + "fk_product" integer, + "date_calcul" timestamp, + "year" smallint, + "ca_genere" float, + UNIQUE(fk_product, year) +); + +CREATE INDEX idx_llx_product_ca_fk_product_year ON llx_product_ca (fk_product, year); diff --git a/pgsql/tables/llx_product_cnv_livre.sql b/pgsql/tables/llx_product_cnv_livre.sql index 96ae916ba2c..dd4b8799fb6 100644 --- a/pgsql/tables/llx_product_cnv_livre.sql +++ b/pgsql/tables/llx_product_cnv_livre.sql @@ -1,50 +1,49 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006-2007 Rodolphe Quiedeville --- --- 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_product_cnv_livre.sql,v 1.5 2007/03/20 15:16:45 rodolphe Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_product_cnv_livre.sql,v $ --- --- ============================================================================ --- --- Produit specifique livre --- - - - -create table llx_product_cnv_livre -( - rowid integer PRIMARY KEY, - "isbn" varchar(13), -- code ISBN - "ean" varchar(13), -- code EAN - "format" varchar(7), -- format de l'ouvrage - "px_feuillet" float(12,4), -- prix au feuillet - "px_reliure" float(12,4), -- prix de la reliure - "px_couverture" float(12,4), -- prix de la couverture - "px_revient" float(12,4), -- prix de revient - "stock_loc" varchar(5), -- emplacement dans le stock - "pages" smallint, -- nombre de page - "fk_couverture" integer, - "fk_contrat" integer, - "fk_auteur" integer DEFAULT 0 -- auteur lien vers llx_societe -); - - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006-2007 Rodolphe Quiedeville +-- +-- 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_product_cnv_livre.sql,v 1.6 2007/12/02 21:37:44 eldy Exp +-- ============================================================================ + +-- +-- Produit specifique livre +-- + + + +create table llx_product_cnv_livre +( + rowid integer PRIMARY KEY, + "isbn" varchar(13), -- code ISBN + "ean" varchar(13), -- code EAN + "format" varchar(7), -- format de l'ouvrage + "px_feuillet" float(12,4), -- prix au feuillet + "px_reliure" float(12,4), -- prix de la reliure + "px_couverture" float(12,4), -- prix de la couverture + "px_revient" float(12,4), -- prix de revient + "stock_loc" varchar(5), -- emplacement dans le stock + "pages" smallint, -- nombre de page + "fk_couverture" integer, + "fk_contrat" integer, + "fk_auteur" integer DEFAULT 0 -- auteur lien vers llx_societe +); + + + diff --git a/pgsql/tables/llx_product_cnv_livre_contrat.sql b/pgsql/tables/llx_product_cnv_livre_contrat.sql index d8c3325f177..8c21227cc1e 100644 --- a/pgsql/tables/llx_product_cnv_livre_contrat.sql +++ b/pgsql/tables/llx_product_cnv_livre_contrat.sql @@ -1,42 +1,40 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006-2007 Rodolphe Quiedeville --- --- 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_product_cnv_livre_contrat.sql,v 1.3 2007/05/09 13:55:43 rodolphe Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_product_cnv_livre_contrat.sql,v $ --- --- ============================================================================ - - - -create table llx_product_cnv_livre_contrat -( - rowid SERIAL PRIMARY KEY, - "fk_cnv_livre" integer, - "quantite" integer, -- quantite achete - "taux" float(3,2), -- taux contractuel - "date_app" timestamp, -- date d'application - "duree" varchar(50), -- duree du contrat - "fk_user" integer, -- utilisateur qui a saisi le contrat - "locked" smallint default 0 -- indique si le contrat est verrouille a la modification -); - - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006-2007 Rodolphe Quiedeville +-- +-- 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_product_cnv_livre_contrat.sql,v 1.4 2007/12/02 21:37:44 eldy Exp +-- ============================================================================ + + + +create table llx_product_cnv_livre_contrat +( + rowid SERIAL PRIMARY KEY, + "fk_cnv_livre" integer, + "quantite" integer, -- quantite achete + "taux" float(3,2), -- taux contractuel + "date_app" timestamp, -- date d'application + "duree" varchar(50), -- duree du contrat + "fk_user" integer, -- utilisateur qui a saisi le contrat + "locked" smallint default 0 -- indique si le contrat est verrouille a la modification +); + + + diff --git a/pgsql/tables/llx_product_det.sql b/pgsql/tables/llx_product_det.sql index a39565e216f..cebb1d8866b 100644 --- a/pgsql/tables/llx_product_det.sql +++ b/pgsql/tables/llx_product_det.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2003 Rodolphe Quiedeville --- --- 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_product_det -( - rowid SERIAL PRIMARY KEY, - "fk_product" integer DEFAULT 0 NOT NULL, - "lang" varchar(5) DEFAULT 0 NOT NULL, - "label" varchar(255) NOT NULL, - "description" text, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- +-- 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_product_det.sql,v 1.4 2007/12/02 21:37:44 eldy Exp +-- ============================================================================ + +create table llx_product_det +( + rowid SERIAL PRIMARY KEY, + "fk_product" integer DEFAULT 0 NOT NULL, + "lang" varchar(5) DEFAULT 0 NOT NULL, + "label" varchar(255) NOT NULL, + "description" text, + "note" text +); diff --git a/pgsql/tables/llx_product_fournisseur.sql b/pgsql/tables/llx_product_fournisseur.sql index 6c8211fcdb9..0b7e87ba83c 100644 --- a/pgsql/tables/llx_product_fournisseur.sql +++ b/pgsql/tables/llx_product_fournisseur.sql @@ -1,41 +1,39 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_product_fournisseur -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "fk_product" integer, - "fk_soc" integer, - "ref_fourn" varchar(30), - "fk_user_author" integer -); - -CREATE INDEX idx_llx_product_fournisseur_fk_product ON llx_product_fournisseur (fk_product); -CREATE INDEX idx_llx_product_fournisseur_fk_soc ON llx_product_fournisseur (fk_soc); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_product_fournisseur.sql,v 1.5 2007/12/02 21:37:45 eldy Exp +-- ============================================================================ + + +create table llx_product_fournisseur +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "fk_product" integer, + "fk_soc" integer, + "ref_fourn" varchar(30), + "fk_user_author" integer +); + +CREATE INDEX idx_llx_product_fournisseur_fk_product ON llx_product_fournisseur (fk_product); +CREATE INDEX idx_llx_product_fournisseur_fk_soc ON llx_product_fournisseur (fk_soc); + diff --git a/pgsql/tables/llx_product_fournisseur_price.key.sql b/pgsql/tables/llx_product_fournisseur_price.key.sql index 164c529f817..d9000b09e73 100644 --- a/pgsql/tables/llx_product_fournisseur_price.key.sql +++ b/pgsql/tables/llx_product_fournisseur_price.key.sql @@ -1,37 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fournisseur_price_fk_user (fk_user); -ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fournisseur_price_fk_soc (fk_soc); -ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fournisseur_price_fk_product (fk_product); - -ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_fk_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); -ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); -ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_product_fournisseur_price.key.sql,v 1.7 2007/12/02 21:37:45 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fournisseur_price_fk_user (fk_user); +ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fournisseur_price_fk_product_fournisseur (fk_product_fournisseur); + +ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_fk_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); +ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_fk_product_fournisseur FOREIGN KEY (fk_product_fournisseur) REFERENCES llx_product_fournisseur (rowid); + + diff --git a/pgsql/tables/llx_product_fournisseur_price.sql b/pgsql/tables/llx_product_fournisseur_price.sql index 87c8333a440..55da1d31e47 100644 --- a/pgsql/tables/llx_product_fournisseur_price.sql +++ b/pgsql/tables/llx_product_fournisseur_price.sql @@ -1,40 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_product_fournisseur_price -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "fk_product" integer, - "fk_soc" integer, -- lien sur llx_societe - "ref_fourn" varchar(30), - "price" real(16,8), - "quantity" real, - "unitprice" real(16,8), - "fk_user" integer -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_product_fournisseur_price.sql,v 1.8 2007/12/02 21:37:45 eldy Exp +-- ============================================================================ + + +create table llx_product_fournisseur_price +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "fk_product_fournisseur" integer NOT NULL, + "price" real(24,8) DEFAULT 0, + "quantity" real, + "unitprice" real(24,8) DEFAULT 0, + "fk_user" integer +); diff --git a/pgsql/tables/llx_product_fournisseur_price_log.sql b/pgsql/tables/llx_product_fournisseur_price_log.sql index 5d6d679c17f..cf823d635c3 100644 --- a/pgsql/tables/llx_product_fournisseur_price_log.sql +++ b/pgsql/tables/llx_product_fournisseur_price_log.sql @@ -1,37 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_product_fournisseur_price_log -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "fk_product" integer, - "fk_soc" integer, -- lien sur llx_societe - "price" real(16,8), - "quantity" real, - "fk_user" integer -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_product_fournisseur_price_log.sql,v 1.6 2007/12/02 21:37:45 eldy Exp +-- ============================================================================ + + +create table llx_product_fournisseur_price_log +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "fk_product_fournisseur" integer NOT NULL, + "price" real(24,8) DEFAULT 0, + "quantity" real, + "fk_user" integer +); diff --git a/pgsql/tables/llx_product_price.sql b/pgsql/tables/llx_product_price.sql index f5240dfa8d4..8bd48705b70 100644 --- a/pgsql/tables/llx_product_price.sql +++ b/pgsql/tables/llx_product_price.sql @@ -1,41 +1,39 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2003 Rodolphe Quiedeville --- --- 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_product_price -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "fk_product" integer NOT NULL, - "date_price" timestamp, - "price_level" int2 NULL DEFAULT 1, - "price" real(16,8), - "price_ttc" real(16,8) DEFAULT 0, - "price_base_type" varchar(3) DEFAULT 'HT', - "tva_tx" real(6,3) NOT NULL, - "fk_user_author" integer, - "envente" smallint DEFAULT 1 -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- +-- 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_product_price.sql,v 1.11 2007/12/02 21:37:45 eldy Exp +-- ============================================================================ + +create table llx_product_price +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "fk_product" integer NOT NULL, + "date_price" timestamp, + "price_level" int2 NULL DEFAULT 1, + "price" real(24,8), + "price_ttc" real(24,8) DEFAULT 0, + "price_base_type" varchar(3) DEFAULT 'HT', + "tva_tx" real(6,3) NOT NULL, + "fk_user_author" integer, + "envente" smallint DEFAULT 1 +); + diff --git a/pgsql/tables/llx_product_stock.sql b/pgsql/tables/llx_product_stock.sql index 25204372f31..d2e746b0f78 100644 --- a/pgsql/tables/llx_product_stock.sql +++ b/pgsql/tables/llx_product_stock.sql @@ -1,39 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_product_stock -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "fk_product" integer NOT NULL, - "fk_entrepot" integer NOT NULL, - "reel" integer -- stock réel -); - -CREATE INDEX idx_llx_product_stock_fk_product ON llx_product_stock (fk_product); -CREATE INDEX idx_llx_product_stock_fk_entrepot ON llx_product_stock (fk_entrepot); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_product_stock.sql,v 1.7 2007/12/02 21:37:45 eldy Exp +-- ============================================================================ + + +create table llx_product_stock +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "fk_product" integer NOT NULL, + "fk_entrepot" integer NOT NULL, + "reel" integer -- stock réel +); + +CREATE INDEX idx_llx_product_stock_fk_product ON llx_product_stock (fk_product); +CREATE INDEX idx_llx_product_stock_fk_entrepot ON llx_product_stock (fk_entrepot); + diff --git a/pgsql/tables/llx_product_subproduct.sql b/pgsql/tables/llx_product_subproduct.sql index 97f6a58f6bd..234854f2ed7 100644 --- a/pgsql/tables/llx_product_subproduct.sql +++ b/pgsql/tables/llx_product_subproduct.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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_product_subproduct.sql,v 1.1 2006/12/04 17:55:12 rodolphe Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_product_subproduct.sql,v $ --- --- ============================================================================ - -create table llx_product_subproduct -( - rowid SERIAL PRIMARY KEY, - "fk_product" integer NOT NULL, -- id du produit maitre - "fk_product_subproduct" integer NOT NULL, -- id du sous-produit - UNIQUE(fk_product, fk_product_subproduct) -); - -CREATE INDEX idx_llx_product_subproduct_fk_product_fk_product_subproduct ON llx_product_subproduct (fk_product, fk_product_subproduct); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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_product_subproduct.sql,v 1.2 2007/12/02 21:37:45 eldy Exp +-- ============================================================================ + +create table llx_product_subproduct +( + rowid SERIAL PRIMARY KEY, + "fk_product" integer NOT NULL, -- id du produit maitre + "fk_product_subproduct" integer NOT NULL, -- id du sous-produit + UNIQUE(fk_product, fk_product_subproduct) +); + +CREATE INDEX idx_llx_product_subproduct_fk_product_fk_product_subproduct ON llx_product_subproduct (fk_product, fk_product_subproduct); + diff --git a/pgsql/tables/llx_projet.sql b/pgsql/tables/llx_projet.sql index 8f117ed4f23..a350f691c0f 100644 --- a/pgsql/tables/llx_projet.sql +++ b/pgsql/tables/llx_projet.sql @@ -1,44 +1,42 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =========================================================================== --- Copyright (C) 2002 Rodolphe Quiedeville --- --- 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_projet -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer NOT NULL, - "fk_statut" smallint NOT NULL, - "tms" timestamp, - "dateo" date, -- date d'ouverture du projet - "ref" varchar(50), - "title" varchar(255), - "fk_user_resp" integer, -- responsable du projet - "fk_user_creat" integer, -- createur du projet - "note" text, - UNIQUE(ref) -); - -CREATE INDEX idx_llx_projet_ref ON llx_projet (ref); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =========================================================================== +-- Copyright (C) 2002 Rodolphe Quiedeville +-- +-- 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_projet.sql,v 1.5 2007/12/02 21:37:45 eldy Exp +-- =========================================================================== + + + +create table llx_projet +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer NOT NULL, + "fk_statut" smallint NOT NULL, + "tms" timestamp, + "dateo" date, -- date d'ouverture du projet + "ref" varchar(50), + "title" varchar(255), + "fk_user_resp" integer, -- responsable du projet + "fk_user_creat" integer, -- createur du projet + "note" text, + UNIQUE(ref) +); + +CREATE INDEX idx_llx_projet_ref ON llx_projet (ref); diff --git a/pgsql/tables/llx_projet_task.sql b/pgsql/tables/llx_projet_task.sql index 4b58601386a..7b4c9c92ce2 100644 --- a/pgsql/tables/llx_projet_task.sql +++ b/pgsql/tables/llx_projet_task.sql @@ -1,43 +1,41 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =========================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_projet_task -( - rowid SERIAL PRIMARY KEY, - "fk_projet" integer NOT NULL, - "fk_task_parent" integer NOT NULL, - "title" varchar(255), - "duration_effective" real NOT NULL, - "fk_user_creat" integer, -- createur - "statut" varchar(6) CHECK (statut IN ('open','closed')) DEFAULT 'open', - "note" text - -); - -CREATE INDEX idx_llx_projet_task_fk_projet ON llx_projet_task (fk_projet); -CREATE INDEX idx_llx_projet_task_statut ON llx_projet_task (statut); -CREATE INDEX idx_llx_projet_task_fk_user_creat ON llx_projet_task (fk_user_creat); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =========================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_projet_task.sql,v 1.2 2007/12/02 21:37:45 eldy Exp +-- =========================================================================== + + +create table llx_projet_task +( + rowid SERIAL PRIMARY KEY, + "fk_projet" integer NOT NULL, + "fk_task_parent" integer NOT NULL, + "title" varchar(255), + "duration_effective" real NOT NULL, + "fk_user_creat" integer, -- createur + "statut" varchar(6) CHECK (statut IN ('open','closed')) DEFAULT 'open', + "note" text + +); + +CREATE INDEX idx_llx_projet_task_fk_projet ON llx_projet_task (fk_projet); +CREATE INDEX idx_llx_projet_task_statut ON llx_projet_task (statut); +CREATE INDEX idx_llx_projet_task_fk_user_creat ON llx_projet_task (fk_user_creat); diff --git a/pgsql/tables/llx_projet_task_actors.sql b/pgsql/tables/llx_projet_task_actors.sql index 45f6a1d1a15..dcc49ad2634 100644 --- a/pgsql/tables/llx_projet_task_actors.sql +++ b/pgsql/tables/llx_projet_task_actors.sql @@ -1,38 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =========================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_projet_task_actors -( - "fk_projet_task" integer NOT NULL, - "fk_user" integer NOT NULL, - "role" varchar(5) CHECK (role IN ('admin','read','acto','info')) DEFAULT 'admin', - UNIQUE(fk_projet_task, fk_user) -); - -CREATE INDEX idx_llx_projet_task_actors_fk_projet_task_fk_user ON llx_projet_task_actors (fk_projet_task, fk_user); -CREATE INDEX idx_llx_projet_task_actors_role ON llx_projet_task_actors (role); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =========================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_projet_task_actors.sql,v 1.2 2007/12/02 21:37:45 eldy Exp +-- =========================================================================== + + + +create table llx_projet_task_actors +( + "fk_projet_task" integer NOT NULL, + "fk_user" integer NOT NULL, + "role" varchar(5) CHECK (role IN ('admin','read','acto','info')) DEFAULT 'admin', + UNIQUE(fk_projet_task, fk_user) +); + +CREATE INDEX idx_llx_projet_task_actors_fk_projet_task_fk_user ON llx_projet_task_actors (fk_projet_task, fk_user); +CREATE INDEX idx_llx_projet_task_actors_role ON llx_projet_task_actors (role); diff --git a/pgsql/tables/llx_projet_task_time.sql b/pgsql/tables/llx_projet_task_time.sql index 57f034412d3..56e402b488d 100644 --- a/pgsql/tables/llx_projet_task_time.sql +++ b/pgsql/tables/llx_projet_task_time.sql @@ -1,40 +1,38 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =========================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_projet_task_time -( - rowid SERIAL PRIMARY KEY, - "fk_task" integer NOT NULL, - "task_date" date, - "task_duration" real, - "fk_user" integer, - "note" text -); - -CREATE INDEX idx_llx_projet_task_time_fk_task ON llx_projet_task_time (fk_task); -CREATE INDEX idx_llx_projet_task_time_fk_user ON llx_projet_task_time (fk_user); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =========================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_projet_task_time.sql,v 1.4 2007/12/02 21:37:45 eldy Exp +-- =========================================================================== + + + +create table llx_projet_task_time +( + rowid SERIAL PRIMARY KEY, + "fk_task" integer NOT NULL, + "task_date" date, + "task_duration" real, + "fk_user" integer, + "note" text +); + +CREATE INDEX idx_llx_projet_task_time_fk_task ON llx_projet_task_time (fk_task); +CREATE INDEX idx_llx_projet_task_time_fk_user ON llx_projet_task_time (fk_user); diff --git a/pgsql/tables/llx_propal.key.sql b/pgsql/tables/llx_propal.key.sql index d9dadb18f3d..8cb8efa6f2d 100644 --- a/pgsql/tables/llx_propal.key.sql +++ b/pgsql/tables/llx_propal.key.sql @@ -1,32 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2002-2004 Rodolphe Quiedeville --- Copyright (C) 2004-2005 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -ALTER TABLE llx_propal ADD INDEX idx_propal_fk_soc (fk_soc); - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2002-2004 Rodolphe Quiedeville +-- Copyright (C) 2004-2005 Laurent Destailleur +-- +-- 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_propal.key.sql,v 1.7 2007/12/02 21:37:46 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_propal ADD INDEX idx_propal_fk_soc (fk_soc); + + ALTER TABLE llx_propal ADD CONSTRAINT fk_propal_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); \ No newline at end of file diff --git a/pgsql/tables/llx_propal.sql b/pgsql/tables/llx_propal.sql index ca7648d4570..49cc0686ad4 100644 --- a/pgsql/tables/llx_propal.sql +++ b/pgsql/tables/llx_propal.sql @@ -1,64 +1,62 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2003 Rodolphe Quiedeville --- --- 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_propal -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer, - "fk_projet" integer DEFAULT 0, -- projet auquel est rattache la propale - "ref" varchar(30) NOT NULL, -- propal number - "ref_client" varchar(30), -- customer order number - "datec" timestamp, -- date de creation - "datep" date, -- date de la propal - "fin_validite" timestamp, -- date de fin de validite - "date_valid" timestamp, -- date de validation - "date_cloture" timestamp, -- date de cloture - "fk_user_author" integer, -- createur de la propale - "fk_user_valid" integer, -- valideur de la propale - "fk_user_cloture" integer, -- cloture de la propale signee ou non signee - "fk_statut" smallint DEFAULT 0 NOT NULL, - "price" real DEFAULT 0, -- (obsolete) - "remise_percent" real DEFAULT 0, -- remise globale relative en pourcent (obsolete) - "remise_absolue" real DEFAULT 0, -- remise globale absolue (obsolete) - "remise" real DEFAULT 0, -- remise calculee (obsolete) - "total_ht" real(16,8) DEFAULT 0, -- montant total ht apres remise globale - "tva" real(16,8) DEFAULT 0, -- montant total tva apres remise globale - "total" real(16,8) DEFAULT 0, -- montant total ttc apres remise globale - "fk_cond_reglement" integer, -- condition de reglement (30 jours, fin de mois ...) - "fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement) - - "note" text, - "note_public" text, - "model_pdf" varchar(50), - "date_livraison" date default NULL, - "fk_adresse_livraison" integer, -- adresse de livraison - - UNIQUE(ref) -); - -CREATE INDEX idx_llx_propal_ref ON llx_propal (ref); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2003 Rodolphe Quiedeville +-- +-- 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_propal.sql,v 1.19 2007/12/02 21:37:46 eldy Exp +-- =================================================================== + + + +create table llx_propal +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer, + "fk_projet" integer DEFAULT 0, -- projet auquel est rattache la propale + "ref" varchar(30) NOT NULL, -- propal number + "ref_client" varchar(30), -- customer order number + "datec" timestamp, -- date de creation + "datep" date, -- date de la propal + "fin_validite" timestamp, -- date de fin de validite + "date_valid" timestamp, -- date de validation + "date_cloture" timestamp, -- date de cloture + "fk_user_author" integer, -- createur de la propale + "fk_user_valid" integer, -- valideur de la propale + "fk_user_cloture" integer, -- cloture de la propale signee ou non signee + "fk_statut" smallint DEFAULT 0 NOT NULL, + "price" real DEFAULT 0, -- (obsolete) + "remise_percent" real DEFAULT 0, -- remise globale relative en pourcent (obsolete) + "remise_absolue" real DEFAULT 0, -- remise globale absolue (obsolete) + "remise" real DEFAULT 0, -- remise calculee (obsolete) + "total_ht" real(24,8) DEFAULT 0, -- montant total ht apres remise globale + "tva" real(24,8) DEFAULT 0, -- montant total tva apres remise globale + "total" real(24,8) DEFAULT 0, -- montant total ttc apres remise globale + "fk_cond_reglement" integer, -- condition de reglement (30 jours, fin de mois ...) + "fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement) + + "note" text, + "note_public" text, + "model_pdf" varchar(50), + "date_livraison" date default NULL, + "fk_adresse_livraison" integer, -- adresse de livraison + + UNIQUE(ref) +); + +CREATE INDEX idx_llx_propal_ref ON llx_propal (ref); diff --git a/pgsql/tables/llx_propaldet.sql b/pgsql/tables/llx_propaldet.sql index e27d76bd76a..8366c839b83 100644 --- a/pgsql/tables/llx_propaldet.sql +++ b/pgsql/tables/llx_propaldet.sql @@ -1,46 +1,54 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2002-2003 Rodolphe Quiedeville --- --- 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_propaldet -( - rowid SERIAL PRIMARY KEY, - "fk_propal" integer, - "fk_product" integer, - "description" text, - "fk_remise_except" integer NULL, -- Lien vers table des remises fixes - "tva_tx" real(6,3), -- taux tva - "qty" real, -- quantité - "remise_percent" real DEFAULT 0, -- pourcentage de remise - "remise" real DEFAULT 0, -- montant de la remise (obsolete) - "price" real, -- prix final (obsolete) - "subprice" real(16,8), -- prix unitaire article - "total_ht" real(16,8), -- Total HT de la ligne toute quantité et incluant remise ligne et globale - "total_tva" real(16,8), -- Total TVA de la ligne toute quantité et incluant remise ligne et globale - "total_ttc" real(16,8), -- Total TTC de la ligne toute quantité et incluant remise ligne et globale - "info_bits" integer DEFAULT 0, -- TVA NPR ou non - "marge_tx" real, -- taux de marge (marge sur prix d'achat) - "marque_tx" real, -- taux de marque (marge sur prix de vente) - "rang" integer DEFAULT 0 -- ordre affichage sur la propal -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- +-- 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_propaldet.sql,v 1.18 2007/12/02 21:37:46 eldy Exp +-- =================================================================== + +create table llx_propaldet +( + rowid SERIAL PRIMARY KEY, + "fk_propal" integer, + "fk_product" integer, + "description" text, + "fk_remise_except" integer NULL, -- Lien vers table des remises fixes + "tva_tx" real(6,3) DEFAULT 0, -- taux tva + "qty" real, -- quantité + "remise_percent" real DEFAULT 0, -- pourcentage de remise + "remise" real DEFAULT 0, -- montant de la remise (obsolete) + "price" real, -- prix final (obsolete) + "subprice" real(24,8) DEFAULT 0, -- prix unitaire article + "total_ht" real(24,8) DEFAULT 0, -- Total HT de la ligne toute quantité et incluant remise ligne et globale + "total_tva" real(24,8) DEFAULT 0, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale + "total_ttc" real(24,8) DEFAULT 0, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale + "info_bits" integer DEFAULT 0, -- TVA NPR ou non + "pa_ht" real(24,8) DEFAULT 0, -- prix d'achat HT + "marge_tx" real(6,3) DEFAULT 0, -- taux de marge (marge sur prix d'achat) + "marque_tx" real(6,3) DEFAULT 0, -- taux de marque (marge sur prix de vente) + "special_code" int2 DEFAULT 0, -- code pour les lignes speciales + "rang" integer DEFAULT 0 -- ordre affichage sur la propal +); + +-- +-- Liste des codes pour special_code +-- +-- 1 : frais de port +-- 2 : ecotaxe +-- \ No newline at end of file diff --git a/pgsql/tables/llx_rights_def.sql b/pgsql/tables/llx_rights_def.sql index 56158029b02..36a6a56a2a8 100644 --- a/pgsql/tables/llx_rights_def.sql +++ b/pgsql/tables/llx_rights_def.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_rights_def -( - id integer PRIMARY KEY, - "libelle" varchar(255), - "module" varchar(12), - "perms" varchar(50), - "subperms" varchar(50), - "type" varchar(1) CHECK (type IN ('r','w','m','d','a')) , - "bydefault" smallint DEFAULT 0 -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_rights_def.sql,v 1.7 2007/12/02 21:37:46 eldy Exp +-- =========================================================================== + +create table llx_rights_def +( + id integer PRIMARY KEY, + "libelle" varchar(255), + "module" varchar(12), + "perms" varchar(50), + "subperms" varchar(50), + "type" varchar(1) CHECK (type IN ('r','w','m','d','a')) , + "bydefault" smallint DEFAULT 0 +); + diff --git a/pgsql/tables/llx_so_gr.sql b/pgsql/tables/llx_so_gr.sql index e827ed700b4..74fedec95d0 100644 --- a/pgsql/tables/llx_so_gr.sql +++ b/pgsql/tables/llx_so_gr.sql @@ -1,38 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2004 Rodolphe Quiedeville --- --- 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$ --- --- Table de liaison des sociétés dans les groupes. --- =================================================================== - - - -create table llx_so_gr -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer, - "fk_groupe" integer, - UNIQUE(fk_soc, fk_groupe) -); - -CREATE INDEX idx_llx_so_gr_fk_soc_fk_groupe ON llx_so_gr (fk_soc, fk_groupe); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2004 Rodolphe Quiedeville +-- +-- 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_so_gr.sql,v 1.2 2007/12/02 21:37:46 eldy Exp +-- +-- Table de liaison des sociétés dans les groupes. +-- =================================================================== + + + +create table llx_so_gr +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer, + "fk_groupe" integer, + UNIQUE(fk_soc, fk_groupe) +); + +CREATE INDEX idx_llx_so_gr_fk_soc_fk_groupe ON llx_so_gr (fk_soc, fk_groupe); diff --git a/pgsql/tables/llx_societe.key.sql b/pgsql/tables/llx_societe.key.sql index 40c02752159..3a383dac1fd 100644 --- a/pgsql/tables/llx_societe.key.sql +++ b/pgsql/tables/llx_societe.key.sql @@ -1,32 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- =================================================================== - - -ALTER TABLE llx_societe ADD UNIQUE uk_societe_prefix_comm(prefix_comm); -ALTER TABLE llx_societe ADD UNIQUE uk_societe_code_client(code_client); - -ALTER TABLE llx_societe ADD INDEX idx_societe_user_creat(fk_user_creat); -ALTER TABLE llx_societe ADD INDEX idx_societe_user_modif(fk_user_modif); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_societe.key.sql,v 1.5 2007/12/02 21:37:46 eldy Exp +-- =================================================================== + + +ALTER TABLE llx_societe ADD UNIQUE uk_societe_prefix_comm(prefix_comm); +ALTER TABLE llx_societe ADD UNIQUE uk_societe_code_client(code_client); + +ALTER TABLE llx_societe ADD INDEX idx_societe_user_creat(fk_user_creat); +ALTER TABLE llx_societe ADD INDEX idx_societe_user_modif(fk_user_modif); diff --git a/pgsql/tables/llx_societe.sql b/pgsql/tables/llx_societe.sql index 6e59af6c688..48a9f241c73 100644 --- a/pgsql/tables/llx_societe.sql +++ b/pgsql/tables/llx_societe.sql @@ -1,76 +1,75 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2000-2004 Rodolphe Quiedeville --- --- 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_societe -( - rowid SERIAL PRIMARY KEY, - "statut" smallint DEFAULT 0, -- statut - "parent" integer, - "tms" timestamp, - "datec" timestamp, -- creation date - "datea" timestamp, -- activation date - "nom" varchar(60), -- company name - "code_client" varchar(15), -- code client - "code_fournisseur" varchar(15), -- code founisseur - "code_compta" varchar(15), -- code compta client - "code_compta_fournisseur" varchar(15), -- code compta founisseur - "address" varchar(255), -- company adresse - "cp" varchar(10), -- zipcode - "ville" varchar(50), -- town - "fk_departement" integer DEFAULT 0, -- - "fk_pays" integer DEFAULT 0, -- - "tel" varchar(20), -- phone number - "fax" varchar(20), -- fax number - "url" varchar(255), -- - "email" varchar(128), -- - "fk_secteur" integer DEFAULT 0, -- - "fk_effectif" integer DEFAULT 0, -- - "fk_typent" integer DEFAULT 0, -- - "fk_forme_juridique" integer DEFAULT 0, -- forme juridique INSEE - "siren" varchar(16), -- IDProf1: siren ou RCS pour france - "siret" varchar(16), -- IDProf2: siret pour france - "ape" varchar(16), -- IDProf3: code ape pour france - "idprof4" varchar(16), -- IDProf4: nu pour france - "tva_intra" varchar(20), -- tva intracommunautaire - "capital" real, -- capital de la société - "description" text, -- - "fk_stcomm" smallint DEFAULT 0, -- commercial statut - "note" text, -- - "services" smallint DEFAULT 0, -- - "prefix_comm" varchar(5), -- prefix commercial - "client" smallint DEFAULT 0, -- client 0/1/2 - "fournisseur" smallint DEFAULT 0, -- fournisseur 0/1 - "customer_bad" smallint DEFAULT 0, -- mauvais payeur 0/1 - "customer_rate" real DEFAULT 0, -- taux fiabilié client (0 à 1) - "supplier_rate" real DEFAULT 0, -- taux fiabilié fournisseur (0 à 1) - "rubrique" varchar(255), -- champ rubrique libre - "fk_user_creat" integer, -- utilisateur qui a créé l'info - "fk_user_modif" integer, -- utilisateur qui a modifié l'info - "remise_client" real DEFAULT 0, -- remise systématique pour le client - "mode_reglement" smallint, -- mode de réglement - "cond_reglement" smallint, -- condition de réglement - "tva_assuj" smallint DEFAULT 1 -- assujéti ou non à la TVA -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2000-2004 Rodolphe Quiedeville +-- +-- 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_societe.sql,v 1.31 2007/12/02 21:37:46 eldy Exp +-- ======================================================================== + +create table llx_societe +( + rowid SERIAL PRIMARY KEY, + "statut" smallint DEFAULT 0, -- statut + "parent" integer, + "tms" timestamp, + "datec" timestamp, -- creation date + "datea" timestamp, -- activation date + "nom" varchar(60), -- company name + "code_client" varchar(15), -- code client + "code_fournisseur" varchar(15), -- code founisseur + "code_compta" varchar(15), -- code compta client + "code_compta_fournisseur" varchar(15), -- code compta founisseur + "address" varchar(255), -- company adresse + "cp" varchar(10), -- zipcode + "ville" varchar(50), -- town + "fk_departement" integer DEFAULT 0, -- + "fk_pays" integer DEFAULT 0, -- + "tel" varchar(20), -- phone number + "fax" varchar(20), -- fax number + "url" varchar(255), -- + "email" varchar(128), -- + "fk_secteur" integer DEFAULT 0, -- + "fk_effectif" integer DEFAULT 0, -- + "fk_typent" integer DEFAULT 0, -- + "fk_forme_juridique" integer DEFAULT 0, -- forme juridique INSEE + "siren" varchar(16), -- IDProf1: siren ou RCS pour france + "siret" varchar(16), -- IDProf2: siret pour france + "ape" varchar(16), -- IDProf3: code ape pour france + "idprof4" varchar(16), -- IDProf4: nu pour france + "tva_intra" varchar(20), -- tva + "capital" real, -- capital de la société + "description" text, -- + "fk_stcomm" smallint DEFAULT 0, -- commercial statut + "note" text, -- + "services" smallint DEFAULT 0, -- + "prefix_comm" varchar(5), -- prefix commercial + "client" smallint DEFAULT 0, -- client 0/1/2 + "fournisseur" smallint DEFAULT 0, -- fournisseur 0/1 + "supplier_account" varchar(32), -- compte client chez un fournisseur + "customer_bad" smallint DEFAULT 0, -- mauvais payeur 0/1 + "customer_rate" real DEFAULT 0, -- taux fiabilié client (0 à 1) + "supplier_rate" real DEFAULT 0, -- taux fiabilié fournisseur (0 à 1) + "rubrique" varchar(255), -- champ rubrique libre + "fk_user_creat" integer, -- utilisateur qui a créé l'info + "fk_user_modif" integer, -- utilisateur qui a modifié l'info + "remise_client" real DEFAULT 0, -- remise systématique pour le client + "mode_reglement" smallint, -- mode de réglement + "cond_reglement" smallint, -- condition de réglement + "tva_assuj" smallint DEFAULT 1 -- assujéti ou non à la TVA +); diff --git a/pgsql/tables/llx_societe_adresse_livraison.sql b/pgsql/tables/llx_societe_adresse_livraison.sql index 26149ca5b56..c2618f7ad7f 100644 --- a/pgsql/tables/llx_societe_adresse_livraison.sql +++ b/pgsql/tables/llx_societe_adresse_livraison.sql @@ -1,43 +1,41 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2000-2004 Rodolphe Quiedeville --- Copyright (C) 2005-2006 Houssin Régis --- --- 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_societe_adresse_livraison -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, -- creation date - "tms" timestamp, -- modification date - "label" varchar(30), -- - "fk_societe" integer DEFAULT 0, -- - "nom" varchar(60), -- company name - "address" varchar(255), -- company adresse - "cp" varchar(10), -- zipcode - "ville" varchar(50), -- town - "fk_pays" integer DEFAULT 0, -- - "note" text, -- - "fk_user_creat" integer, -- utilisateur qui a créé l'info - "fk_user_modif" integer -- utilisateur qui a modifié l'info +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2000-2004 Rodolphe Quiedeville +-- Copyright (C) 2005-2006 Houssin Régis +-- +-- 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_societe_adresse_livraison.sql,v 1.7 2007/12/02 21:37:46 eldy Exp +-- ======================================================================== + +create table llx_societe_adresse_livraison +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, -- creation date + "tms" timestamp, -- modification date + "label" varchar(30), -- + "fk_societe" integer DEFAULT 0, -- + "nom" varchar(60), -- company name + "address" varchar(255), -- company adresse + "cp" varchar(10), -- zipcode + "ville" varchar(50), -- town + "fk_pays" integer DEFAULT 0, -- + "note" text, -- + "fk_user_creat" integer, -- utilisateur qui a créé l'info + "fk_user_modif" integer -- utilisateur qui a modifié l'info ); \ No newline at end of file diff --git a/pgsql/tables/llx_societe_commerciaux.sql b/pgsql/tables/llx_societe_commerciaux.sql index 071d993a266..1277ec9bcc6 100644 --- a/pgsql/tables/llx_societe_commerciaux.sql +++ b/pgsql/tables/llx_societe_commerciaux.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_societe_commerciaux -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer, - "fk_user" integer, - UNIQUE(fk_soc, fk_user) -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_societe_commerciaux.sql,v 1.2 2007/12/02 21:37:46 eldy Exp +-- ======================================================================== + + +create table llx_societe_commerciaux +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer, + "fk_user" integer, + UNIQUE(fk_soc, fk_user) +); + diff --git a/pgsql/tables/llx_societe_consult.sql b/pgsql/tables/llx_societe_consult.sql index 29551387a11..0067d526fb7 100644 --- a/pgsql/tables/llx_societe_consult.sql +++ b/pgsql/tables/llx_societe_consult.sql @@ -1,36 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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$ --- --- ======================================================================== --- --- Le type InnoDB n'est pas nécessaire pour cette table --- -create table llx_societe_consult -( - "fk_soc" integer, - "fk_user" integer, - "datec" timestamp, - "action" varchar(1) CHECK (action IN ('w','r')) -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_societe_consult.sql,v 1.4 2007/12/02 21:37:46 eldy Exp +-- ======================================================================== + +-- +-- Le type InnoDB n'est pas nécessaire pour cette table +-- +create table llx_societe_consult +( + "fk_soc" integer, + "fk_user" integer, + "datec" timestamp, + "action" varchar(1) CHECK (action IN ('w','r')) +); + diff --git a/pgsql/tables/llx_societe_perms.sql b/pgsql/tables/llx_societe_perms.sql index d933b40d430..00cab6d8324 100644 --- a/pgsql/tables/llx_societe_perms.sql +++ b/pgsql/tables/llx_societe_perms.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_societe_perms -( - "fk_soc" integer, - "fk_user" integer, - "pread" smallint DEFAULT 0, -- permission de lecture - "pwrite" smallint DEFAULT 0, -- permission d'ecriture - "pperms" smallint DEFAULT 0, -- permission sur les permissions - UNIQUE(fk_soc, fk_user) -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_societe_perms.sql,v 1.4 2007/12/02 21:37:47 eldy Exp +-- ======================================================================== + + +create table llx_societe_perms +( + "fk_soc" integer, + "fk_user" integer, + "pread" smallint DEFAULT 0, -- permission de lecture + "pwrite" smallint DEFAULT 0, -- permission d'ecriture + "pperms" smallint DEFAULT 0, -- permission sur les permissions + UNIQUE(fk_soc, fk_user) +); + diff --git a/pgsql/tables/llx_societe_prices.sql b/pgsql/tables/llx_societe_prices.sql index 1f5a7775080..1071ee4a3a1 100644 --- a/pgsql/tables/llx_societe_prices.sql +++ b/pgsql/tables/llx_societe_prices.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2007 Rodolphe Quiedeville --- --- 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_societe_prices.sql,v 1.1 2007/01/29 09:42:07 rodolphe Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_societe_prices.sql,v $ --- --- ======================================================================== - -create table llx_societe_prices -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer DEFAULT 0, - "tms" timestamp NOT NULL, - "datec" timestamp, - "fk_user_author" integer, - "price_level" smallint DEFAULT 1 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2007 Rodolphe Quiedeville +-- +-- 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_societe_prices.sql,v 1.2 2007/12/02 21:37:47 eldy Exp +-- ======================================================================== + +create table llx_societe_prices +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer DEFAULT 0, + "tms" timestamp NOT NULL, + "datec" timestamp, + "fk_user_author" integer, + "price_level" smallint DEFAULT 1 +); diff --git a/pgsql/tables/llx_societe_remise.sql b/pgsql/tables/llx_societe_remise.sql index 98a6d10315a..b5dcc0887aa 100644 --- a/pgsql/tables/llx_societe_remise.sql +++ b/pgsql/tables/llx_societe_remise.sql @@ -1,39 +1,38 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ======================================================================== --- Copyright (C) 2000-2004 Rodolphe Quiedeville --- --- 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$ --- --- Historique evolution de la remise relative des tiers --- ======================================================================== - - -create table llx_societe_remise -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer NOT NULL, - "tms" timestamp, - "datec" timestamp, -- creation date - "fk_user_author" integer, -- utilisateur qui a créé l'info - "remise_client" real DEFAULT 0, -- remise systématique pour le client - "note" text -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ======================================================================== +-- Copyright (C) 2000-2004 Rodolphe Quiedeville +-- +-- 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_societe_remise.sql,v 1.5 2007/12/02 21:37:47 eldy Exp +-- +-- Historique evolution de la remise relative des tiers +-- ======================================================================== + + +create table llx_societe_remise +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer NOT NULL, + "tms" timestamp, + "datec" timestamp, -- creation date + "fk_user_author" integer, -- utilisateur qui a créé l'info + "remise_client" real DEFAULT 0, -- remise systématique pour le client + "note" text +); + diff --git a/pgsql/tables/llx_societe_remise_except.key.sql b/pgsql/tables/llx_societe_remise_except.key.sql index e47dbed4a3a..843db8bc1e6 100644 --- a/pgsql/tables/llx_societe_remise_except.key.sql +++ b/pgsql/tables/llx_societe_remise_except.key.sql @@ -1,43 +1,44 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004 Rodolphe Quiedeville --- Copyright (C) 2005-2007 Laurent Destailleur --- --- 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$ --- --- Remises exceptionnelles --- --- ============================================================================ - - -ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_fk_user (fk_user); -ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_fk_soc (fk_soc); -ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_fk_facture (fk_facture); -ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_fk_facture_source (fk_facture_source); - - -ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); -ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); -ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facturedet (rowid); -ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_facture_source FOREIGN KEY (fk_facture_source) REFERENCES llx_facture (rowid); - - - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2005-2007 Laurent Destailleur +-- +-- 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_societe_remise_except.key.sql,v 1.8 2007/12/02 21:37:47 eldy Exp +-- +-- Remises exceptionnelles +-- +-- ============================================================================ + + +ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_fk_user (fk_user); +ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_fk_soc (fk_soc); +ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_fk_facture_line (fk_facture_line); +ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_fk_facture (fk_facture); +ALTER TABLE llx_societe_remise_except ADD INDEX idx_societe_remise_except_fk_facture_source (fk_facture_source); + + +ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); +ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); +ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_facture_line FOREIGN KEY (fk_facture_line) REFERENCES llx_facturedet (rowid); +ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); +ALTER TABLE llx_societe_remise_except ADD CONSTRAINT fk_societe_remise_fk_facture_source FOREIGN KEY (fk_facture_source) REFERENCES llx_facture (rowid); + + + diff --git a/pgsql/tables/llx_societe_remise_except.sql b/pgsql/tables/llx_societe_remise_except.sql index c00def30503..b323015f198 100644 --- a/pgsql/tables/llx_societe_remise_except.sql +++ b/pgsql/tables/llx_societe_remise_except.sql @@ -1,42 +1,42 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004 Rodolphe Quiedeville --- Copyright (C) 2006-2007 Laurent Destailleur --- --- 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$ --- --- Remises exceptionnelles --- ============================================================================ - -create table llx_societe_remise_except -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer NOT NULL, -- client - "datec" timestamp, - "amount_ht" real(16,8) NOT NULL, - "amount_tva" real(16,8) DEFAULT 0 NOT NULL, - "amount_ttc" real(16,8) DEFAULT 0 NOT NULL, - "tva_tx" real(6,3) DEFAULT 0 NOT NULL, - "fk_user" integer NOT NULL, - "fk_facture" integer, - "fk_facture_source" integer, - "description" varchar(255) NOT NULL -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2006-2007 Laurent Destailleur +-- +-- 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_societe_remise_except.sql,v 1.7 2007/12/02 17:59:07 eldy Exp +-- +-- Remises exceptionnelles +-- ============================================================================ + +create table llx_societe_remise_except +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer NOT NULL, -- client + "datec" timestamp, + "amount_ht" real(24,8) NOT NULL, + "amount_tva" real(24,8) DEFAULT 0 NOT NULL, + "amount_ttc" real(24,8) DEFAULT 0 NOT NULL, + "tva_tx" real(6,3) DEFAULT 0 NOT NULL, + "fk_user" integer NOT NULL, + "fk_facture_line" integer, + "fk_facture" integer, + "fk_facture_source" integer, + "description" varchar(255) NOT NULL +); diff --git a/pgsql/tables/llx_societe_rib.sql b/pgsql/tables/llx_societe_rib.sql index f23346fedb2..03fd8a5a9de 100644 --- a/pgsql/tables/llx_societe_rib.sql +++ b/pgsql/tables/llx_societe_rib.sql @@ -1,48 +1,44 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================= --- Copyright (C) 2000-2004 Rodolphe Quiedeville --- --- 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_societe_rib -( - rowid SERIAL PRIMARY KEY, - "fk_soc" integer NOT NULL, - "datec" timestamp, - "tms" timestamp, - "label" varchar(30), - "bank" varchar(255), - "code_banque" varchar(7), - "code_guichet" varchar(6), - "number" varchar(255), - "cle_rib" varchar(5), - "bic" varchar(10), - "iban_prefix" varchar(5), - "domiciliation" varchar(255), - "proprio" varchar(60), - "adresse_proprio" varchar(255) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================= +-- Copyright (C) 2000-2004 Rodolphe Quiedeville +-- +-- 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_societe_rib.sql,v 1.3 2007/12/02 21:37:47 eldy Exp +-- ============================================================================= + + + +create table llx_societe_rib +( + rowid SERIAL PRIMARY KEY, + "fk_soc" integer NOT NULL, + "datec" timestamp, + "tms" timestamp, + "label" varchar(30), + "bank" varchar(255), + "code_banque" varchar(7), + "code_guichet" varchar(6), + "number" varchar(255), + "cle_rib" varchar(5), + "bic" varchar(10), + "iban_prefix" varchar(5), + "domiciliation" varchar(255), + "proprio" varchar(60), + "adresse_proprio" varchar(255) +); diff --git a/pgsql/tables/llx_socpeople.key.sql b/pgsql/tables/llx_socpeople.key.sql index 505a33d492a..a9dcd239637 100644 --- a/pgsql/tables/llx_socpeople.key.sql +++ b/pgsql/tables/llx_socpeople.key.sql @@ -1,32 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005-2007 Laurent Destailleur --- --- 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$ --- --- ============================================================================ - - -ALTER TABLE llx_socpeople ADD INDEX idx_socpeople_fk_soc (fk_soc); -ALTER TABLE llx_socpeople ADD INDEX idx_socpeople_fk_user_creat (fk_user_creat); - -ALTER TABLE llx_socpeople ADD CONSTRAINT fk_socpeople_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); -ALTER TABLE llx_socpeople ADD CONSTRAINT fk_socpeople_user_creat_user_rowid FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005-2007 Laurent Destailleur +-- +-- 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_socpeople.key.sql,v 1.7 2007/12/02 21:37:47 eldy Exp +-- ============================================================================ + + +ALTER TABLE llx_socpeople ADD INDEX idx_socpeople_fk_soc (fk_soc); +ALTER TABLE llx_socpeople ADD INDEX idx_socpeople_fk_user_creat (fk_user_creat); + +ALTER TABLE llx_socpeople ADD CONSTRAINT fk_socpeople_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); +ALTER TABLE llx_socpeople ADD CONSTRAINT fk_socpeople_user_creat_user_rowid FOREIGN KEY (fk_user_creat) REFERENCES llx_user (rowid); diff --git a/pgsql/tables/llx_socpeople.sql b/pgsql/tables/llx_socpeople.sql index 76d75010439..a6ab2f68d27 100644 --- a/pgsql/tables/llx_socpeople.sql +++ b/pgsql/tables/llx_socpeople.sql @@ -1,51 +1,49 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2001-2004 Rodolphe Quiedeville --- --- 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_socpeople -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "fk_soc" integer, -- lien vers la societe - "civilite" varchar(6), - "name" varchar(50), - "firstname" varchar(50), - "address" varchar(255), - "cp" varchar(25), - "ville" varchar(255), - "fk_pays" integer DEFAULT 0, - "birthday" date, - "poste" varchar(80), - "phone" varchar(30), - "phone_perso" varchar(30), - "phone_mobile" varchar(30), - "fax" varchar(30), - "email" varchar(255), - "jabberid" varchar(255), - "fk_user_creat" integer DEFAULT 0, -- user qui a créé l'enregistrement - "fk_user_modif" integer, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2001-2004 Rodolphe Quiedeville +-- +-- 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_socpeople.sql,v 1.18 2007/12/02 21:37:47 eldy Exp +-- ============================================================================ + +create table llx_socpeople +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "fk_soc" integer, -- lien vers la societe + "civilite" varchar(6), + "name" varchar(50), + "firstname" varchar(50), + "address" varchar(255), + "cp" varchar(25), + "ville" varchar(255), + "fk_pays" integer DEFAULT 0, + "birthday" date, + "poste" varchar(80), + "phone" varchar(30), + "phone_perso" varchar(30), + "phone_mobile" varchar(30), + "fax" varchar(30), + "email" varchar(255), + "jabberid" varchar(255), + "fk_user_creat" integer DEFAULT 0, -- user qui a créé l'enregistrement + "fk_user_modif" integer, + "note" text +); diff --git a/pgsql/tables/llx_stock_mouvement.sql b/pgsql/tables/llx_stock_mouvement.sql index f88300581f6..bfac17cbdde 100644 --- a/pgsql/tables/llx_stock_mouvement.sql +++ b/pgsql/tables/llx_stock_mouvement.sql @@ -1,43 +1,41 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_stock_mouvement -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "datem" timestamp, - "fk_product" integer NOT NULL, - "fk_entrepot" integer NOT NULL, - "value" integer, - "price" float(13,4) DEFAULT 0, - "type_mouvement" smallint, - "fk_user_author" integer -); - -CREATE INDEX idx_llx_stock_mouvement_fk_product ON llx_stock_mouvement (fk_product); -CREATE INDEX idx_llx_stock_mouvement_fk_entrepot ON llx_stock_mouvement (fk_entrepot); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_stock_mouvement.sql,v 1.7 2007/12/02 21:37:47 eldy Exp +-- ============================================================================ + + +create table llx_stock_mouvement +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "datem" timestamp, + "fk_product" integer NOT NULL, + "fk_entrepot" integer NOT NULL, + "value" integer, + "price" float(13,4) DEFAULT 0, + "type_mouvement" smallint, + "fk_user_author" integer +); + +CREATE INDEX idx_llx_stock_mouvement_fk_product ON llx_stock_mouvement (fk_product); +CREATE INDEX idx_llx_stock_mouvement_fk_entrepot ON llx_stock_mouvement (fk_entrepot); + diff --git a/pgsql/tables/llx_stock_valorisation.sql b/pgsql/tables/llx_stock_valorisation.sql index e54b50d9485..03974653ce7 100644 --- a/pgsql/tables/llx_stock_valorisation.sql +++ b/pgsql/tables/llx_stock_valorisation.sql @@ -1,44 +1,42 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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_stock_valorisation.sql,v 1.1 2006/12/13 14:15:16 rodolphe Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_stock_valorisation.sql,v $ --- --- ============================================================================ - - -create table llx_stock_valorisation -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, -- date technique mise à jour automatiquement - "date_valo" timestamp, -- date de valorisation - "fk_product" integer NOT NULL, -- id du produit concerne par l'operation - "qty_ope" float(9,3), -- quantité de l'operation - "price_ope" float(12,4), -- prix unitaire du produit concerne par l'operation - "valo_ope" float(12,4), -- valorisation de l'operation - "price_pmp" float(12,4), -- valeur PMP de l'operation - "qty_stock" float(9,3) DEFAULT 0, -- qunatite en stock - "valo_pmp" float(12,4), -- valorisation du stock en PMP - "fk_stock_mouvement" integer -- id du mouvement de stock -); - -CREATE INDEX idx_llx_stock_valorisation_fk_product ON llx_stock_valorisation (fk_product); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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_stock_valorisation.sql,v 1.2 2007/12/02 21:37:47 eldy Exp +-- ============================================================================ + + +create table llx_stock_valorisation +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, -- date technique mise à jour automatiquement + "date_valo" timestamp, -- date de valorisation + "fk_product" integer NOT NULL, -- id du produit concerne par l'operation + "qty_ope" float(9,3), -- quantité de l'operation + "price_ope" float(12,4), -- prix unitaire du produit concerne par l'operation + "valo_ope" float(12,4), -- valorisation de l'operation + "price_pmp" float(12,4), -- valeur PMP de l'operation + "qty_stock" float(9,3) DEFAULT 0, -- qunatite en stock + "valo_pmp" float(12,4), -- valorisation du stock en PMP + "fk_stock_mouvement" integer -- id du mouvement de stock +); + +CREATE INDEX idx_llx_stock_valorisation_fk_product ON llx_stock_valorisation (fk_product); + diff --git a/pgsql/tables/llx_transaction_bplc.sql b/pgsql/tables/llx_transaction_bplc.sql index fa707e93a2b..580c4be1018 100644 --- a/pgsql/tables/llx_transaction_bplc.sql +++ b/pgsql/tables/llx_transaction_bplc.sql @@ -1,40 +1,38 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2002 Rodolphe Quiedeville --- --- 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_transaction_bplc -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "ipclient" varchar(20), - "num_transaction" varchar(10), - "date_transaction" varchar(10), - "heure_transaction" varchar(10), - "num_autorisation" varchar(10), - "cle_acceptation" varchar(5), - "code_retour" integer, - "ref_commande" integer -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- +-- 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_transaction_bplc.sql,v 1.5 2007/12/02 21:37:47 eldy Exp +-- =================================================================== + + +create table llx_transaction_bplc +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "ipclient" varchar(20), + "num_transaction" varchar(10), + "date_transaction" varchar(10), + "heure_transaction" varchar(10), + "num_autorisation" varchar(10), + "cle_acceptation" varchar(5), + "code_retour" integer, + "ref_commande" integer +); diff --git a/pgsql/tables/llx_tva.sql b/pgsql/tables/llx_tva.sql index 3df05257e4c..861ea02e444 100644 --- a/pgsql/tables/llx_tva.sql +++ b/pgsql/tables/llx_tva.sql @@ -1,36 +1,37 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2002-2003 Rodolphe Quiedeville --- --- 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_tva -( - rowid SERIAL PRIMARY KEY, - "tms" timestamp, - "datep" date, -- date de paiement - "datev" date, -- date de valeur - "amount" real NOT NULL DEFAULT 0, - "label" varchar(255), - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- +-- 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_tva.sql,v 1.8 2007/12/02 21:37:47 eldy Exp +-- =================================================================== + +create table llx_tva +( + rowid SERIAL PRIMARY KEY, + "tms" timestamp, + "datep" date, -- date de paiement + "datev" date, -- date de valeur + "amount" real NOT NULL DEFAULT 0, + "label" varchar(255), + "note" text, + "fk_bank" integer NOT NULL, + "fk_user_creat" integer, -- utilisateur qui a créé l'info + "fk_user_modif" integer -- utilisateur qui a modifié l'info +); diff --git a/pgsql/tables/llx_user.key.sql b/pgsql/tables/llx_user.key.sql index 088f051ee96..9d4e60eeb7e 100644 --- a/pgsql/tables/llx_user.key.sql +++ b/pgsql/tables/llx_user.key.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2006-2007 Laurent Destailleur --- Copyright (C) 2007 Regis Houssin --- --- 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_user.key.sql,v 1.2 2007/09/01 15:03:48 hregis Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/pgsql/tables/llx_user.key.sql,v $ --- --- =========================================================================== - - -ALTER TABLE llx_user ADD UNIQUE INDEX uk_user_login (login); - -ALTER TABLE llx_user ADD INDEX uk_user_fk_societe (fk_societe); - -ALTER TABLE llx_user ADD UNIQUE INDEX uk_user_fk_socpeople (fk_socpeople); -ALTER TABLE llx_user ADD UNIQUE INDEX uk_user_fk_member (fk_member); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2006-2007 Laurent Destailleur +-- Copyright (C) 2007 Regis Houssin +-- +-- 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_user.key.sql,v 1.5 2007/12/02 21:37:47 eldy Exp +-- =========================================================================== + + +ALTER TABLE llx_user ADD UNIQUE INDEX uk_user_login (login); + +ALTER TABLE llx_user ADD INDEX uk_user_fk_societe (fk_societe); + +ALTER TABLE llx_user ADD UNIQUE INDEX uk_user_fk_socpeople (fk_socpeople); +ALTER TABLE llx_user ADD UNIQUE INDEX uk_user_fk_member (fk_member); diff --git a/pgsql/tables/llx_user.sql b/pgsql/tables/llx_user.sql index 40abd8c92e2..43f92265ced 100644 --- a/pgsql/tables/llx_user.sql +++ b/pgsql/tables/llx_user.sql @@ -1,58 +1,58 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2001-2003 Rodolphe Quiedeville --- Copyright (C) 2006-2007 Laurent Destailleur --- Copyright (C) 2007 Regis Houssin --- --- 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_user -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "login" varchar(24) NOT NULL, - "pass" varchar(32), - "pass_crypted" varchar(128), - "pass_temp" varchar(32), -- temporary password when asked for forget password - "name" varchar(50), - "firstname" varchar(50), - "office_phone" varchar(20), - "office_fax" varchar(20), - "user_mobile" varchar(20), - "email" varchar(255), - "admin" smallint DEFAULT 0, - "webcal_login" varchar(25), - "module_comm" smallint DEFAULT 1, - "module_compta" smallint DEFAULT 1, - "fk_societe" integer, - "fk_socpeople" integer, - "fk_member" integer, - "note" text DEFAULT NULL, - "datelastlogin" timestamp, - "datepreviouslogin" timestamp, - "egroupware_id" integer, - "ldap_sid" varchar(255) DEFAULT NULL, - "statut" smallint DEFAULT 1, - "lang" varchar(6) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2001-2003 Rodolphe Quiedeville +-- Copyright (C) 2006-2007 Laurent Destailleur +-- Copyright (C) 2007 Regis Houssin +-- +-- 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_user.sql,v 1.26 2007/11/08 18:36:25 eldy Exp +-- =========================================================================== + +create table llx_user +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "login" varchar(24) NOT NULL, + "pass" varchar(32), + "pass_crypted" varchar(128), + "pass_temp" varchar(32), -- temporary password when asked for forget password + "name" varchar(50), + "firstname" varchar(50), + "office_phone" varchar(20), + "office_fax" varchar(20), + "user_mobile" varchar(20), + "email" varchar(255), + "admin" smallint DEFAULT 0, + "webcal_login" varchar(25), + "phenix_login" varchar(25), + "phenix_pass" varchar(128), + "module_comm" smallint DEFAULT 1, + "module_compta" smallint DEFAULT 1, + "fk_societe" integer, + "fk_socpeople" integer, + "fk_member" integer, + "note" text DEFAULT NULL, + "datelastlogin" timestamp, + "datepreviouslogin" timestamp, + "egroupware_id" integer, + "ldap_sid" varchar(255) DEFAULT NULL, + "statut" smallint DEFAULT 1, + "lang" varchar(6) +); diff --git a/pgsql/tables/llx_user_alert.sql b/pgsql/tables/llx_user_alert.sql index 3357d656244..b37a153e9af 100644 --- a/pgsql/tables/llx_user_alert.sql +++ b/pgsql/tables/llx_user_alert.sql @@ -1,34 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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_user_alert -( - rowid SERIAL PRIMARY KEY, - "type" integer, - "fk_contact" integer, -- pointe sur llx_socpeople - "fk_user" integer -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_user_alert.sql,v 1.2 2007/12/02 21:37:48 eldy Exp +-- ============================================================================ + +create table llx_user_alert +( + rowid SERIAL PRIMARY KEY, + "type" integer, + "fk_contact" integer, -- pointe sur llx_socpeople + "fk_user" integer +); diff --git a/pgsql/tables/llx_user_clicktodial.sql b/pgsql/tables/llx_user_clicktodial.sql index 9383f18517f..eb60f33fcab 100644 --- a/pgsql/tables/llx_user_clicktodial.sql +++ b/pgsql/tables/llx_user_clicktodial.sql @@ -1,36 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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$ --- --- =========================================================================== --- --- Stockage des informations relatives au click to dial --- - -create table llx_user_clicktodial -( - fk_user integer PRIMARY KEY, - "login" varchar(32), - "pass" varchar(64), - "poste" varchar(20) -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_user_clicktodial.sql,v 1.2 2007/12/02 21:37:48 eldy Exp +-- =========================================================================== + +-- +-- Stockage des informations relatives au click to dial +-- + +create table llx_user_clicktodial +( + fk_user integer PRIMARY KEY, + "login" varchar(32), + "pass" varchar(64), + "poste" varchar(20) +); diff --git a/pgsql/tables/llx_user_entrepot.sql b/pgsql/tables/llx_user_entrepot.sql index d87d060a2c6..bbefeacf719 100644 --- a/pgsql/tables/llx_user_entrepot.sql +++ b/pgsql/tables/llx_user_entrepot.sql @@ -1,34 +1,32 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2006 Rodolphe Quiedeville --- --- 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_user_entrepot.sql,v 1.1 2006/12/03 17:40:26 rodolphe Exp $ --- $Source: /cvsroot/dolibarr/dolibarr/mysql/tables/llx_user_entrepot.sql,v $ --- --- ============================================================================ - -create table llx_user_entrepot -( - rowid SERIAL PRIMARY KEY, - "fk_entrepot" integer, -- pointe sur llx_entrepot - "fk_user" integer, -- pointe sur llx_user - "consult" int2, - "send" int2 -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2006 Rodolphe Quiedeville +-- +-- 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_user_entrepot.sql,v 1.2 2007/12/02 21:37:48 eldy Exp +-- ============================================================================ + +create table llx_user_entrepot +( + rowid SERIAL PRIMARY KEY, + "fk_entrepot" integer, -- pointe sur llx_entrepot + "fk_user" integer, -- pointe sur llx_user + "consult" int2, + "send" int2 +); diff --git a/pgsql/tables/llx_user_param.sql b/pgsql/tables/llx_user_param.sql index 8c07f8ed963..76ae22ee6fb 100644 --- a/pgsql/tables/llx_user_param.sql +++ b/pgsql/tables/llx_user_param.sql @@ -1,38 +1,36 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2004 Rodolphe Quiedeville --- Copyright (C) 2004 Laurent Destailleur --- --- 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_user_param -( - "fk_user" integer NOT NULL, - "page" varchar(255) NOT NULL, - "param" varchar(64) NOT NULL, - "value" varchar(255) NOT NULL, - UNIQUE(fk_user,page,param) -); - -CREATE INDEX idx_llx_user_param_fk_user_page_param ON llx_user_param (fk_user,page,param); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2004 Laurent Destailleur +-- +-- 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_user_param.sql,v 1.5 2007/12/02 21:37:48 eldy Exp +-- =========================================================================== + + +create table llx_user_param +( + "fk_user" integer NOT NULL, + "page" varchar(255) NOT NULL, + "param" varchar(64) NOT NULL, + "value" varchar(255) NOT NULL, + UNIQUE(fk_user,page,param) +); + +CREATE INDEX idx_llx_user_param_fk_user_page_param ON llx_user_param (fk_user,page,param); diff --git a/pgsql/tables/llx_user_rights.key.sql b/pgsql/tables/llx_user_rights.key.sql index 560e99de526..039eafb7432 100644 --- a/pgsql/tables/llx_user_rights.key.sql +++ b/pgsql/tables/llx_user_rights.key.sql @@ -1,33 +1,31 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- =========================================================================== - - --- Supprimme orhpelins pour permettre montée de la clé --- V4 DELETE llx_user_rights FROM llx_user_rights LEFT JOIN llx_user ON llx_user_rights.fk_user = llx_user.rowid WHERE llx_user.rowid IS NULL; - - -ALTER TABLE llx_user_rights ADD CONSTRAINT fk_user_rights_fk_user_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_user_rights.key.sql,v 1.6 2007/12/02 21:37:48 eldy Exp +-- =========================================================================== + + +-- Supprimme orhpelins pour permettre montée de la clé +-- V4 DELETE llx_user_rights FROM llx_user_rights LEFT JOIN llx_user ON llx_user_rights.fk_user = llx_user.rowid WHERE llx_user.rowid IS NULL; + + +ALTER TABLE llx_user_rights ADD CONSTRAINT fk_user_rights_fk_user_user FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); diff --git a/pgsql/tables/llx_user_rights.sql b/pgsql/tables/llx_user_rights.sql index 3295a376ed4..717ebf5ae6e 100644 --- a/pgsql/tables/llx_user_rights.sql +++ b/pgsql/tables/llx_user_rights.sql @@ -1,35 +1,33 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2003 Rodolphe Quiedeville --- --- 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_user_rights -( - rowid SERIAL PRIMARY KEY, - "fk_user" integer NOT NULL, - "fk_id" integer NOT NULL, - UNIQUE(fk_user,fk_id) -); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2003 Rodolphe Quiedeville +-- +-- 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_user_rights.sql,v 1.6 2007/12/02 21:37:48 eldy Exp +-- =========================================================================== + + +create table llx_user_rights +( + rowid SERIAL PRIMARY KEY, + "fk_user" integer NOT NULL, + "fk_id" integer NOT NULL, + UNIQUE(fk_user,fk_id) +); + diff --git a/pgsql/tables/llx_usergroup.sql b/pgsql/tables/llx_usergroup.sql index d52e898b459..61ce7c2d7e2 100644 --- a/pgsql/tables/llx_usergroup.sql +++ b/pgsql/tables/llx_usergroup.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Rodolphe Quiedeville --- Copyright (C) 2005 Laurent Destailleur --- --- 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_usergroup -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "tms" timestamp, - "nom" varchar(255) NOT NULL UNIQUE, - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Rodolphe Quiedeville +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_usergroup.sql,v 1.3 2007/12/02 21:37:48 eldy Exp +-- =========================================================================== + + +create table llx_usergroup +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "tms" timestamp, + "nom" varchar(255) NOT NULL UNIQUE, + "note" text +); diff --git a/pgsql/tables/llx_usergroup_rights.key.sql b/pgsql/tables/llx_usergroup_rights.key.sql index 6429ade339c..17fbe716008 100644 --- a/pgsql/tables/llx_usergroup_rights.key.sql +++ b/pgsql/tables/llx_usergroup_rights.key.sql @@ -1,32 +1,30 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Laurent Destailleur --- --- 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$ --- --- =========================================================================== - - --- Supprime orhpelins pour permettre montée de la clé --- V4 DELETE llx_usergroup_rights FROM llx_usergroup_rights LEFT JOIN llx_usergroup ON llx_usergroup_rights.fk_usergroup = llx_usergroup.rowid WHERE llx_usergroup.rowid IS NULL; - - -ALTER TABLE llx_usergroup_rights ADD CONSTRAINT fk_usergroup_rights_fk_usergroup FOREIGN KEY (fk_usergroup) REFERENCES llx_usergroup (rowid); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_usergroup_rights.key.sql,v 1.7 2007/12/02 21:37:48 eldy Exp +-- =========================================================================== + + +-- Supprime orhpelins pour permettre montée de la clé +-- V4 DELETE llx_usergroup_rights FROM llx_usergroup_rights LEFT JOIN llx_usergroup ON llx_usergroup_rights.fk_usergroup = llx_usergroup.rowid WHERE llx_usergroup.rowid IS NULL; + + +ALTER TABLE llx_usergroup_rights ADD CONSTRAINT fk_usergroup_rights_fk_usergroup FOREIGN KEY (fk_usergroup) REFERENCES llx_usergroup (rowid); diff --git a/pgsql/tables/llx_usergroup_rights.sql b/pgsql/tables/llx_usergroup_rights.sql index c9f96b0941c..54f9543673d 100644 --- a/pgsql/tables/llx_usergroup_rights.sql +++ b/pgsql/tables/llx_usergroup_rights.sql @@ -1,37 +1,35 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Laurent Destailleur --- --- 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_usergroup_rights -( - rowid SERIAL PRIMARY KEY, - "fk_usergroup" integer NOT NULL, - "fk_id" integer NOT NULL, - UNIQUE(fk_usergroup,fk_id) -); - -CREATE INDEX idx_llx_usergroup_rights_fk_usergroup_fk_id ON llx_usergroup_rights (fk_usergroup,fk_id); - +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Laurent Destailleur +-- +-- 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_usergroup_rights.sql,v 1.2 2007/12/02 21:37:48 eldy Exp +-- =========================================================================== + + +create table llx_usergroup_rights +( + rowid SERIAL PRIMARY KEY, + "fk_usergroup" integer NOT NULL, + "fk_id" integer NOT NULL, + UNIQUE(fk_usergroup,fk_id) +); + +CREATE INDEX idx_llx_usergroup_rights_fk_usergroup_fk_id ON llx_usergroup_rights (fk_usergroup,fk_id); + diff --git a/pgsql/tables/llx_usergroup_user.sql b/pgsql/tables/llx_usergroup_user.sql index 811e33e9354..2f5a6b0d2ab 100644 --- a/pgsql/tables/llx_usergroup_user.sql +++ b/pgsql/tables/llx_usergroup_user.sql @@ -1,36 +1,34 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- ============================================================================ --- Copyright (C) 2005 Rodolphe Quiedeville --- --- 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_usergroup_user -( - rowid SERIAL PRIMARY KEY, - "fk_user" integer NOT NULL, - "fk_usergroup" integer NOT NULL, - UNIQUE(fk_user,fk_usergroup) -); - -CREATE INDEX idx_llx_usergroup_user_fk_user_fk_usergroup ON llx_usergroup_user (fk_user,fk_usergroup); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- ============================================================================ +-- Copyright (C) 2005 Rodolphe Quiedeville +-- +-- 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_usergroup_user.sql,v 1.2 2007/12/02 21:37:48 eldy Exp +-- =========================================================================== + + +create table llx_usergroup_user +( + rowid SERIAL PRIMARY KEY, + "fk_user" integer NOT NULL, + "fk_usergroup" integer NOT NULL, + UNIQUE(fk_user,fk_usergroup) +); + +CREATE INDEX idx_llx_usergroup_user_fk_user_fk_usergroup ON llx_usergroup_user (fk_user,fk_usergroup); diff --git a/pgsql/tables/llx_voyage.sql b/pgsql/tables/llx_voyage.sql index f8cf8ce04c8..7a6b71826d0 100644 --- a/pgsql/tables/llx_voyage.sql +++ b/pgsql/tables/llx_voyage.sql @@ -1,49 +1,48 @@ --- Generated from dolibarr_mysql2pgsql --- (c) 2004, PostgreSQL Inc. --- (c) 2005, Laurent Destailleur. - --- =================================================================== --- Copyright (C) 2001-2002 Rodolphe Quiedeville --- --- $Id$ --- $Source$ --- --- 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. --- --- insert into llx_voyage (date_depart, date_arrivee, amount, depart, arrivee, fk_reduc) --- values ('2002-04-21 12:05','2002-04-21 15:25',26.8,'Paris','Auray',1) - --- insert into llx_voyage (date_depart, date_arrivee, amount, depart, arrivee, fk_reduc) --- values ('2002-04-23 15:42','2002-04-23 19:10',26.8,'Auray','Paris',1) --- =================================================================== - - -create table llx_voyage -( - rowid SERIAL PRIMARY KEY, - "datec" timestamp, - "dateo" date, -- date operation - "date_depart" timestamp, -- date du voyage - "date_arrivee" timestamp, -- date du voyage - "amount" real NOT NULL DEFAULT 0, -- prix du billet - "reduction" real NOT NULL DEFAULT 0, -- montant de la reduction obtenue - "depart" varchar(255), - "arrivee" varchar(255), - "fk_type" smallint, -- Train, Avion, Bateaux - "fk_reduc" integer, - "distance" integer, -- distance en kilometre - "dossier" varchar(50), -- numero de dossier - "note" text -); +-- Generated by dolibarr_mysql2pgsql +-- (c) 2004, PostgreSQL Inc. +-- (c) 2005, Laurent Destailleur. + +-- =================================================================== +-- Copyright (C) 2001-2002 Rodolphe Quiedeville +-- +-- 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. +-- +-- insert into llx_voyage (date_depart, date_arrivee, amount, depart, arrivee, fk_reduc) +-- values ('2002-04-21 12:05','2002-04-21 15:25',26.8,'Paris','Auray',1) + +-- insert into llx_voyage (date_depart, date_arrivee, amount, depart, arrivee, fk_reduc) +-- values ('2002-04-23 15:42','2002-04-23 19:10',26.8,'Auray','Paris',1) +-- +-- Id: llx_voyage.sql,v 1.6 2007/12/02 21:37:48 eldy Exp +-- =================================================================== + + +create table llx_voyage +( + rowid SERIAL PRIMARY KEY, + "datec" timestamp, + "dateo" date, -- date operation + "date_depart" timestamp, -- date du voyage + "date_arrivee" timestamp, -- date du voyage + "amount" real NOT NULL DEFAULT 0, -- prix du billet + "reduction" real NOT NULL DEFAULT 0, -- montant de la reduction obtenue + "depart" varchar(255), + "arrivee" varchar(255), + "fk_type" smallint, -- Train, Avion, Bateaux + "fk_reduc" integer, + "distance" integer, -- distance en kilometre + "dossier" varchar(50), -- numero de dossier + "note" text +); diff --git a/pgsql/tables/llx_voyage_reduc.sql b/pgsql/tables/llx_voyage_reduc.sql index 0727e6b12e5..2b40ee980eb 100644 --- a/pgsql/tables/llx_voyage_reduc.sql +++ b/pgsql/tables/llx_voyage_reduc.sql @@ -19,7 +19,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- Id: llx_voyage_reduc.sql,v 1.5 2007/12/02 21:37:48 eldy Exp -- =================================================================== create table llx_voyage_reduc