fix: replace exists+create with try/catch for vectorsdb metadata init

This commit is contained in:
Prem Palanisamy
2026-04-02 06:26:55 +02:00
parent 25d9891f2b
commit d17ae517d3
2 changed files with 2 additions and 2 deletions
Binary file not shown.
@@ -130,9 +130,9 @@ class Create extends CollectionAction
$indexes[] = new Document($index);
}
try {
// passing null in creates only creates the metadata collection
if (!$dbForDatabases->exists(null, Database::METADATA)) {
try {
$dbForDatabases->create();
} catch (DuplicateException) {
}
$dbForDatabases->createCollection(
id: 'database_' . $database->getSequence() . '_collection_' . $collection->getSequence(),