Skip to content

Commit

Permalink
Fix: missing upgrade with minor version
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Sep 3, 2012
1 parent 616ee24 commit 14b1b1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion htdocs/install/mysql/migration/3.1.0-3.2.0.sql
Expand Up @@ -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;

Expand Down
10 changes: 7 additions & 3 deletions htdocs/install/upgrade.php
Expand Up @@ -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();
Expand Down Expand Up @@ -379,4 +383,4 @@

// Return code if ran from command line
if ($ret) exit($ret);
?>
?>

0 comments on commit 14b1b1d

Please sign in to comment.