Skip to content

Commit 89a5ec6

Browse files
committed
Revert autoincrement set to default behaviour
1 parent d1f639a commit 89a5ec6

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/Database/Adapter/Postgres.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,17 +1043,6 @@ public function createDocument(Document $collection, Document $document): Docume
10431043

10441044
try {
10451045
$this->execute($stmt);
1046-
1047-
if (!empty($document->getSequence())) {
1048-
$this->getPDO()->exec("
1049-
SELECT setval(
1050-
pg_get_serial_sequence('{$this->getSQLTable($name)}', '_id'),
1051-
(SELECT MAX(_id) FROM {$this->getSQLTable($name)}),
1052-
true
1053-
);
1054-
");
1055-
}
1056-
10571046
$lastInsertedId = $this->getPDO()->lastInsertId();
10581047
// Sequence can be manually set as well
10591048
$document['$sequence'] ??= $lastInsertedId;

0 commit comments

Comments
 (0)