浏览代码

Fix DB\Pgsql for TRUNCATE TABLE

For https://github.com/forkbb/forkbb/pull/7
Visman 3 年之前
父节点
当前提交
e45cc5ffc3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Core/DB/Pgsql.php

+ 1 - 1
app/Core/DB/Pgsql.php

@@ -457,7 +457,7 @@ class Pgsql
 
         $table = ($noPrefix ? '' : $this->dbPrefix) . $table;
 
-        return false !== $this->db->exec("TRUNCATE TABLE ONLY \"{$table}\"");
+        return false !== $this->db->exec("TRUNCATE TABLE ONLY \"{$table}\" RESTART IDENTITY");
     }
 
     /**