diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php index 29324f2684..6288ebd43a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php @@ -120,10 +120,10 @@ class Create extends Action try { $dbForProject->createCollection('database_' . $database->getSequence(), $attributes, $indexes); - $dbFordatabases = $getDatabasesDB($database); // legacy and tablesdb are created on the same project database // need to check for multitype databases if ($this->getDatabaseType() !== TABLESDB && $this->getDatabaseType() !== 'legacy') { + $dbFordatabases = $getDatabasesDB($this->getDatabaseDSN($project)); $dbFordatabases->create(); } } catch (DuplicateException) {