Skip to content

Commit

Permalink
Fixed issue #8614: Error during upgrade vom 2.00 to 2.05 when using P…
Browse files Browse the repository at this point in the history
…ostgres
  • Loading branch information
c-schmitz committed Feb 4, 2014
1 parent 6fdf3ad commit 609676a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion application/helpers/update/updatedb_helper.php
Expand Up @@ -1194,7 +1194,14 @@ function db_upgrade_all($iOldDBVersion) {
}
if ($iOldDBVersion < 175)
{
alterColumn('{{plugins}}', 'active', "integer",false,'0');
switch ($sDBDriverName){
case 'pgsql':
// Special treatment for Postgres as it is too dumb to convert a boolean to a number without explicit being told to do so
alterColumn('{{plugins}}', 'active', "INTEGER USING (active::integer)", false);
break;
default:
alterColumn('{{plugins}}', 'active', "integer",false,'0');
}
$oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>175),"stg_name='DBVersion'");
}
if ($iOldDBVersion < 176)
Expand Down

0 comments on commit 609676a

Please sign in to comment.