From 14b1b1d6e5ca105d3eb8aa87cb204045d5c15b2b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 3 Sep 2012 16:27:16 +0200 Subject: [PATCH] Fix: missing upgrade with minor version --- htdocs/install/mysql/migration/3.1.0-3.2.0.sql | 2 +- htdocs/install/upgrade.php | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index 8523fce46c535..a7add395e4c71 100755 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -37,7 +37,7 @@ update llx_commande set fk_user_author = null where fk_user_author not in (selec update llx_commande set fk_user_valid = null where fk_user_valid not in (select rowid from llx_user); -ALTER TABLE llx_extrafields ADD COLUMN TYPE VARCHAR(8); +ALTER TABLE llx_extrafields ADD COLUMN type VARCHAR(8); UPDATE llx_c_paper_format SET active=1 WHERE active=0; diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 8c6c16c7bb575..41f0b6099f63a 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -310,11 +310,15 @@ { $dir = "mysql/migration/"; // We use mysql migration scripts whatever is database driver + // For minor version + $newversionfrom=preg_replace('/(\.[0-9]+)$/i','.0',$versionfrom); + $newversionto=preg_replace('/(\.[0-9]+)$/i','.0',$versionto); + $filelist=array(); $i = 0; $ok = 0; - $from='^'.$versionfrom; - $to=$versionto.'\.sql$'; + $from='^'.$newversionfrom; + $to=$newversionto.'\.sql$'; // Get files list $filesindir=array(); @@ -379,4 +383,4 @@ // Return code if ran from command line if ($ret) exit($ret); -?> \ No newline at end of file +?>