Skip to content

Commit 89be130

Browse files
committed
Merge branch 'main' of github.com:utopia-php/database into joins9
2 parents 5acd59f + cff2b6e commit 89be130

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Database/Database.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,8 +1800,10 @@ public function createCollection(string $id, array $attributes = [], array $inde
18001800
$this->adapter->createCollection($id, $attributes, $indexes);
18011801
$createdPhysicalTable = true;
18021802
} catch (DuplicateException $e) {
1803-
if ($this->adapter->getSharedTables()
1804-
&& ($id === self::METADATA || $this->adapter->exists($this->adapter->getDatabase(), $id))) {
1803+
if ($id === self::METADATA
1804+
|| ($this->adapter->getSharedTables()
1805+
&& $this->adapter->exists($this->adapter->getDatabase(), $id))) {
1806+
// The metadata table must never be dropped during reconciliation.
18051807
// In shared-tables mode the physical table is reused across
18061808
// tenants. A DuplicateException simply means the table already
18071809
// exists for another tenant — not an orphan.

0 commit comments

Comments
 (0)