Skip to content

Commit 6924ad9

Browse files
committed
Move higher
1 parent b566721 commit 6924ad9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Database/Adapter/Postgres.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,6 @@ public function createDocument(string $collection, Document $document): Document
10261026

10271027
try {
10281028
$this->execute($stmt);
1029-
$lastInsertedId = $this->getPDO()->lastInsertId();
10301029

10311030
if (!empty($document->getSequence())) {
10321031
$this->getPDO()->exec("
@@ -1037,7 +1036,8 @@ public function createDocument(string $collection, Document $document): Document
10371036
);
10381037
");
10391038
}
1040-
1039+
1040+
$lastInsertedId = $this->getPDO()->lastInsertId();
10411041
// Sequence can be manually set as well
10421042
$document['$sequence'] ??= $lastInsertedId;
10431043

0 commit comments

Comments
 (0)