2
0
forked from Wavyzz/dolibarr

Fix: Suppression erreurs si install mysql 3.23.49

This commit is contained in:
Laurent Destailleur
2005-06-27 20:17:57 +00:00
parent 7350e31efa
commit 580a6054ba
13 changed files with 54 additions and 43 deletions

View File

@@ -1,6 +1,7 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr> -- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org> -- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -18,8 +19,9 @@
-- --
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_categorie_association ADD INDEX (fk_categorie_mere);
ALTER TABLE llx_categorie_association ADD INDEX (fk_categorie_fille); 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 FOREIGN KEY (fk_categorie_mere) REFERENCES llx_categorie (rowid); ALTER TABLE llx_categorie_association ADD FOREIGN KEY (fk_categorie_mere) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_association ADD FOREIGN KEY (fk_categorie_fille) REFERENCES llx_categorie (rowid); ALTER TABLE llx_categorie_association ADD FOREIGN KEY (fk_categorie_fille) REFERENCES llx_categorie (rowid);

View File

@@ -1,6 +1,7 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr> -- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org> -- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -18,10 +19,9 @@
-- --
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_categorie_product ADD INDEX (fk_categorie);
ALTER TABLE llx_categorie_product ADD INDEX (fk_product);
ALTER TABLE llx_categorie_product ADD FOREIGN KEY (fk_categorie) ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_categorie (fk_categorie);
REFERENCES llx_categorie (rowid); ALTER TABLE llx_categorie_product ADD INDEX idx_categorie_product_fk_product (fk_product);
ALTER TABLE llx_categorie_product ADD FOREIGN KEY (fk_product)
REFERENCES llx_product (rowid); ALTER TABLE llx_categorie_product ADD FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
ALTER TABLE llx_categorie_product ADD FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);

View File

@@ -1,6 +1,6 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -21,8 +21,10 @@
-- --
-- ============================================================================ -- ============================================================================
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63> -- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL; -- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL;
-- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_user ON llx_contrat.fk_user_author = llx_user.rowid WHERE llx_user.rowid IS NULL;
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc); ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc);
ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author); ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author);

View File

@@ -1,5 +1,6 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -19,14 +20,13 @@
-- $Source$ -- $Source$
-- --
-- ============================================================================ -- ============================================================================
--
--
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_fk_contrat (fk_contrat); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_fk_contrat (fk_contrat);
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_fk_product (fk_product); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_fk_product (fk_product);
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_ouverture_prevue (date_ouverture_prevue); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_ouverture_prevue (date_ouverture_prevue);
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_ouverture (date_ouverture); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_ouverture (date_ouverture);
ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_fin_validite (date_fin_validite); ALTER TABLE llx_contratdet ADD INDEX idx_contratdet_date_fin_validite (date_fin_validite);
--
--
ALTER TABLE llx_contratdet ADD FOREIGN KEY (fk_contrat) REFERENCES llx_contrat (rowid); ALTER TABLE llx_contratdet ADD FOREIGN KEY (fk_contrat) REFERENCES llx_contrat (rowid);
ALTER TABLE llx_contratdet ADD FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); ALTER TABLE llx_contratdet ADD FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);

View File

@@ -21,7 +21,8 @@
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63> -- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
DELETE llx_facture_tva_sum FROM llx_facture_tva_sum LEFT JOIN llx_facture ON llx_facture_tva_sum.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL; -- V4 DELETE llx_facture_tva_sum FROM llx_facture_tva_sum LEFT JOIN llx_facture ON llx_facture_tva_sum.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
ALTER TABLE llx_facture_tva_sum ADD INDEX idx_facture_tva_sum_fk_facture (fk_facture); ALTER TABLE llx_facture_tva_sum ADD INDEX idx_facture_tva_sum_fk_facture (fk_facture);
ALTER TABLE llx_facture_tva_sum ADD CONSTRAINT facture_tva_sum_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);

View File

@@ -21,8 +21,8 @@
-- =========================================================================== -- ===========================================================================
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63> -- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
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_facture ON llx_paiement_facture.fk_facture = llx_facture.rowid WHERE llx_facture.rowid IS NULL;
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; -- 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 INDEX idx_paiement_facture_fk_facture (fk_facture);
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_facture FOREIGN KEY (fk_facture) REFERENCES llx_facture (rowid);

View File

@@ -1,5 +1,6 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -20,10 +21,9 @@
-- --
-- ============================================================================ -- ============================================================================
--
-- ALTER TABLE llx_prelevement_facture ADD INDEX idx_prelevement_facture_fk_prelevement_lignes (fk_prelevement_lignes);
ALTER TABLE llx_prelevement_facture ADD INDEX (fk_prelevement_lignes);
--
--
ALTER TABLE llx_prelevement_facture ADD FOREIGN KEY (fk_prelevement_lignes) REFERENCES llx_prelevement_lignes (rowid); ALTER TABLE llx_prelevement_facture ADD FOREIGN KEY (fk_prelevement_lignes) REFERENCES llx_prelevement_lignes (rowid);

View File

@@ -1,5 +1,6 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -20,10 +21,9 @@
-- --
-- ============================================================================ -- ============================================================================
--
-- ALTER TABLE llx_prelevement_lignes ADD INDEX idx_prelevement_lignes_fk_prelevement_bons (fk_prelevement_bons);
ALTER TABLE llx_prelevement_lignes ADD INDEX (fk_prelevement_bons);
--
--
ALTER TABLE llx_prelevement_lignes ADD FOREIGN KEY (fk_prelevement_bons) REFERENCES llx_prelevement_bons (rowid); ALTER TABLE llx_prelevement_lignes ADD FOREIGN KEY (fk_prelevement_bons) REFERENCES llx_prelevement_bons (rowid);

View File

@@ -1,5 +1,6 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -21,9 +22,9 @@
-- ============================================================================ -- ============================================================================
ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_fk_user (fk_user); 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_fk_soc (fk_soc); 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_fk_product (fk_product); ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fournisseur_price_fk_product (fk_product);
ALTER TABLE llx_product_fournisseur_price ADD FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); ALTER TABLE llx_product_fournisseur_price ADD FOREIGN KEY (fk_user) REFERENCES llx_user (rowid);
ALTER TABLE llx_product_fournisseur_price ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); ALTER TABLE llx_product_fournisseur_price ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);

View File

@@ -1,6 +1,6 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> -- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -23,5 +23,7 @@
ALTER TABLE llx_propal ADD INDEX idx_propal_fk_soc (fk_soc); ALTER TABLE llx_propal ADD INDEX idx_propal_fk_soc (fk_soc);
ALTER TABLE llx_propal ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); ALTER TABLE llx_propal ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);

View File

@@ -1,5 +1,6 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -24,10 +25,10 @@
-- ============================================================================ -- ============================================================================
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 (fk_user);
ALTER TABLE llx_societe_remise_except ADD INDEX (fk_soc);
ALTER TABLE llx_societe_remise_except ADD INDEX (fk_facture);
ALTER TABLE llx_societe_remise_except ADD FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); ALTER TABLE llx_societe_remise_except ADD FOREIGN KEY (fk_user) REFERENCES llx_user (rowid);
ALTER TABLE llx_societe_remise_except ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp); ALTER TABLE llx_societe_remise_except ADD FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);

View File

@@ -1,5 +1,6 @@
-- ============================================================================ -- ============================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> -- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
-- --
-- This program is free software; you can redistribute it and/or modify -- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by -- it under the terms of the GNU General Public License as published by
@@ -20,10 +21,9 @@
-- --
-- =========================================================================== -- ===========================================================================
-- Supprimme orhpelins pour permettre mont<6E>e de la cl<63> -- Supprimme orhpelins pour permettre mont<6E>e de la cl<63>
delete llx_user_rights 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;
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 FOREIGN KEY (fk_user) REFERENCES llx_user (rowid); ALTER TABLE llx_user_rights ADD FOREIGN KEY (fk_user) REFERENCES llx_user (rowid);

View File

@@ -20,7 +20,9 @@
-- --
-- =========================================================================== -- ===========================================================================
-- Supprime orhpelins pour permettre mont<6E>e de la cl<63> -- Supprime orhpelins pour permettre mont<6E>e de la cl<63>
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; -- 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 FOREIGN KEY (fk_usergroup) REFERENCES llx_usergroup (rowid); ALTER TABLE llx_usergroup_rights ADD FOREIGN KEY (fk_usergroup) REFERENCES llx_usergroup (rowid);