Remove unnecessary +1 from PostgreSQL sequence correction query.

This commit is contained in:
Andreas Fischer 2014-04-11 21:56:14 +02:00
parent 94522586c1
commit f35eae6442

View file

@ -232,7 +232,7 @@ class ConvertType extends Command {
array("nextval('".$sequence->getName()."'::regclass)", $dbname)); array("nextval('".$sequence->getName()."'::regclass)", $dbname));
$table_name = $info['table_name']; $table_name = $info['table_name'];
$column_name = $info['column_name']; $column_name = $info['column_name'];
$toDB->executeQuery("SELECT setval('" . $sequence->getName() . "', (SELECT MAX(" . $column_name . ") FROM " . $table_name . ")+1)"); $toDB->executeQuery("SELECT setval('" . $sequence->getName() . "', (SELECT MAX(" . $column_name . ") FROM " . $table_name . "))");
} }
} }
// save new database config // save new database config