diff --git a/htdocs/install/mysql/migration/2.8.0-2.9.0.sql b/htdocs/install/mysql/migration/2.8.0-2.9.0.sql index 4c92a763f27..0b6f5b31bad 100755 --- a/htdocs/install/mysql/migration/2.8.0-2.9.0.sql +++ b/htdocs/install/mysql/migration/2.8.0-2.9.0.sql @@ -161,7 +161,7 @@ INSERT INTO `llx_c_field_list` (`rowid`, `element`, `entity`, `name`, `alias`, ` (8, 'product_default', 1, 'p.envente', 'status', 'Status', 'right', 1, 0, '1', 8); -UPDATE llx_adherent SET pays = null where pays <= 0 and pays != '0'; +UPDATE llx_adherent SET pays = null where pays <= '0' and pays != '0'; ALTER table llx_adherent MODIFY pays integer; -- add milestone module diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index fb0f8369946..6ca50cb8b05 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -224,9 +224,9 @@ if (! isset($_GET["action"]) || preg_match('/upgrade/i',$_GET["action"])) } /* - * Remove deprecated indexes and constraints + * Remove deprecated indexes and constraints for Mysql */ - if ($ok) + if ($ok && preg_match('/mysql/',$db->type)) { $versioncommande=explode('.','4.0'); if (sizeof($versioncommande) && sizeof($versionarray) @@ -279,9 +279,7 @@ if (! isset($_GET["action"]) || preg_match('/upgrade/i',$_GET["action"])) */ if ($ok) { - if ($choix==1) $dir = "mysql/migration/"; - elseif ($choix==2) $dir = "pgsql/migration/"; - else $dir = "mssql/migration/"; + $dir = "mysql/migration/"; // We use mysql migration scripts whatever is database driver $filelist=array(); $i = 0; @@ -292,11 +290,18 @@ if (! isset($_GET["action"]) || preg_match('/upgrade/i',$_GET["action"])) # Recupere list fichier $filesindir=array(); $handle=opendir($dir); - while (($file = readdir($handle))!==false) + if ($handle) { - if (preg_match('/\.sql$/i',$file)) $filesindir[]=$file; + while (($file = readdir($handle))!==false) + { + if (preg_match('/\.sql$/i',$file)) $filesindir[]=$file; + } + sort($filesindir); + } + else + { + print '