Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Database/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -1796,8 +1796,10 @@ public function createCollection(string $id, array $attributes = [], array $inde
$this->adapter->createCollection($id, $attributes, $indexes);
$createdPhysicalTable = true;
} catch (DuplicateException $e) {
if ($this->adapter->getSharedTables()
&& ($id === self::METADATA || $this->adapter->exists($this->adapter->getDatabase(), $id))) {
if ($id === self::METADATA
|| ($this->adapter->getSharedTables()
&& $this->adapter->exists($this->adapter->getDatabase(), $id))) {
// The metadata table must never be dropped during reconciliation.
// In shared-tables mode the physical table is reused across
// tenants. A DuplicateException simply means the table already
// exists for another tenant — not an orphan.
Expand Down
Loading