From ae4fc3aed8010ade7d3ebdaf1ba3288ddba2a9e0 Mon Sep 17 00:00:00 2001 From: opensides Date: Mon, 14 Jun 2004 21:08:39 +0000 Subject: [PATCH] Adaptation pour dolibarr head --- pgsql/drop-constraints.sql | 8 +++++++ pgsql/drop.sql | 47 ++++++++++++++++++++++++++++---------- pgsql/foreign_keys.sql | 19 +++++++++++---- 3 files changed, 57 insertions(+), 17 deletions(-) diff --git a/pgsql/drop-constraints.sql b/pgsql/drop-constraints.sql index 2bf0773b995..f15bf0a9474 100644 --- a/pgsql/drop-constraints.sql +++ b/pgsql/drop-constraints.sql @@ -34,3 +34,11 @@ ALTER TABLE llx_facturedet DROP CONSTRAINT "facturedet_fk_facture_rowid"; ALTER TABLE llx_facture_tva_sum DROP CONSTRAINT "facture_tva_sum_fk_facture_rowid"; ALTER TABLE llx_socpeople DROP CONSTRAINT "socpeople_fk_soc_idp"; + +ALTER TABLE llx_paiement_facture DROP CONSTRAINT "paiement_facture_fk_facture"; + +ALTER TABLE llx_paiement_facture DROP CONSTRAINT "paiement_facture_fk_paiement"; + +ALTER TABLE llx_c_departements DROP CONSTRAINT "c_departements_fk_region"; + +ALTER TABLE llx_c_regions DROP CONSTRAINT "c_regions_fk_pays"; diff --git a/pgsql/drop.sql b/pgsql/drop.sql index 23c346dfe53..649cb7c530d 100644 --- a/pgsql/drop.sql +++ b/pgsql/drop.sql @@ -21,26 +21,27 @@ -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- -drop table llx_bank_url; -drop table llx_entrepot; -drop table llx_product_stock; -drop table llx_stock_mouvement; +drop table llx_co_fa; -drop table c_actioncomm; +drop table llx_co_pr; -drop table c_chargesociales; +drop table llx_c_actioncomm; -drop table c_effectif; +drop table llx_c_chargesociales; -drop table c_paiement ; +drop table llx_c_effectif; -drop table c_pays ; +drop table llx_c_paiement ; -drop table c_propalst ; +drop table llx_c_pays ; -drop table c_stcomm; +drop table llx_c_prestatype ; -drop table c_typent ; +drop table llx_c_propalst ; + +drop table llx_c_stcomm; + +drop table llx_c_typent ; drop table llx_action_def; @@ -70,6 +71,10 @@ drop table llx_bank_categ; drop table llx_bank_class; +drop table llx_bank_url; + +drop table llx_birthday_alert; + drop table llx_bookmark; drop table llx_boxes; @@ -80,6 +85,10 @@ drop table llx_chargesociales; drop table llx_contrat; +drop table llx_commande; + +drop table llx_commandedet; + drop table llx_compta; drop table llx_compta_account; @@ -102,6 +111,14 @@ drop table llx_don_projet; drop table llx_editeur; +drop table llx_entrepot; + +drop table llx_expedition; + +drop table llx_expedition_methode; + +drop table llx_expeditiondet; + drop table llx_fa_pr; drop table llx_facture; @@ -144,6 +161,8 @@ drop table llx_product_fournisseur; drop table llx_product_price; +drop table llx_product_stock; + drop table llx_projet; drop table llx_propal; @@ -166,6 +185,10 @@ drop table llx_soc_recontact; drop table llx_socstatutlog ; +drop table llx_stock; + +drop table llx_stock_mouvement; + drop table llx_sqltables; drop table llx_todocomm ; diff --git a/pgsql/foreign_keys.sql b/pgsql/foreign_keys.sql index bd961ac490e..c193842b12d 100644 --- a/pgsql/foreign_keys.sql +++ b/pgsql/foreign_keys.sql @@ -20,14 +20,23 @@ -- $Source$ -- ============================================================================ -ALTER TABLE llx_fichinter ADD CONSTRAINT fichinter_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); +ALTER TABLE llx_fichinter ADD CONSTRAINT fichinter_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); -ALTER TABLE llx_propal ADD CONSTRAINT propal_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); +ALTER TABLE llx_propal ADD CONSTRAINT propal_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); -ALTER TABLE llx_facture ADD CONSTRAINT facture_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); +ALTER TABLE llx_facture ADD CONSTRAINT facture_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); -ALTER TABLE llx_facturedet ADD CONSTRAINT facturedet_fk_facture_rowid FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); +ALTER TABLE llx_paiement_facture ADD CONSTRAINT paiement_facture_fk_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); + +ALTER TABLE llx_paiement_facture ADD CONSTRAINT paiement_facture_fk_paiement FOREIGN KEY (fk_paiement) REFERENCES llx_paiement (rowid); + +ALTER TABLE llx_facturedet ADD CONSTRAINT facturedet_fk_facture_rowid FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); ALTER TABLE llx_facture_tva_sum ADD CONSTRAINT facture_tva_sum_fk_facture_rowid FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid); -ALTER TABLE llx_socpeople ADD CONSTRAINT socpeople_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); +ALTER TABLE llx_socpeople ADD CONSTRAINT socpeople_fk_soc_idp FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); + +ALTER TABLE llx_c_departements ADD CONSTRAINT c_departements_fk_region FOREIGN KEY (fk_region) REFERENCES llx_c_regions (code_region); + +ALTER TABLE llx_c_regions ADD CONSTRAINT c_regions_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_pays (rowid); +