From f35eae64423b6d0346a13ff04fe2106d27276d66 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Apr 2014 21:56:14 +0200 Subject: [PATCH] Remove unnecessary +1 from PostgreSQL sequence correction query. --- core/command/db/converttype.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php index 863c739918..cf0f4437f7 100644 --- a/core/command/db/converttype.php +++ b/core/command/db/converttype.php @@ -232,7 +232,7 @@ class ConvertType extends Command { array("nextval('".$sequence->getName()."'::regclass)", $dbname)); $table_name = $info['table_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