From 29233bfa8d79298397f7f0fcadcaeeff867df6f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Jun 2006 21:40:23 +0000 Subject: [PATCH] Fix: Erreur drop primary key --- htdocs/install/upgrade.php | 3 ++- htdocs/lib/mysql.lib.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 7ee31676d0f..9f290ae039c 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -179,7 +179,8 @@ if (! isset($_GET["action"]) || $_GET["action"] == "upgrade") 'DB_ERROR_NOSUCHTABLE', 'DB_ERROR_NOSUCHFIELD', 'DB_ERROR_NO_FOREIGN_KEY_TO_DROP', - 'DB_ERROR_CANNOT_CREATE' // Qd contrainte deja existante + 'DB_ERROR_CANNOT_CREATE', // Qd contrainte deja existante + 'DB_ERROR_CANT_DROP_PRIMARY_KEY' ); if (in_array($errno,$okerror)) { diff --git a/htdocs/lib/mysql.lib.php b/htdocs/lib/mysql.lib.php index cda95e180e6..90985eca035 100644 --- a/htdocs/lib/mysql.lib.php +++ b/htdocs/lib/mysql.lib.php @@ -68,6 +68,7 @@ class DoliDb 1008 => 'DB_ERROR_CANNOT_DROP', 1025 => 'DB_ERROR_NO_FOREIGN_KEY_TO_DROP', 1046 => 'DB_ERROR_NODBSELECTED', + 1048 => 'DB_ERROR_CONSTRAINT', 1050 => 'DB_ERROR_TABLE_ALREADY_EXISTS', 1051 => 'DB_ERROR_NOSUCHTABLE', 1054 => 'DB_ERROR_NOSUCHFIELD', @@ -75,11 +76,11 @@ class DoliDb 1061 => 'DB_ERROR_KEY_NAME_ALREADY_EXISTS', 1062 => 'DB_ERROR_RECORD_ALREADY_EXISTS', 1064 => 'DB_ERROR_SYNTAX', + 1075 => 'DB_ERROR_CANT_DROP_PRIMARY_KEY', 1091 => 'DB_ERROR_NOSUCHFIELD', 1100 => 'DB_ERROR_NOT_LOCKED', 1136 => 'DB_ERROR_VALUE_COUNT_ON_ROW', 1146 => 'DB_ERROR_NOSUCHTABLE', - 1048 => 'DB_ERROR_CONSTRAINT', 1216 => 'DB_ERROR_NO_PARENT', 1217 => 'DB_ERROR_CHILD_EXISTS' );