Use create bulk attributes

This commit is contained in:
Jake Barnby
2025-05-16 20:30:04 +12:00
parent 4d4cfef1ad
commit 768d005f08
+4 -6
View File
@@ -234,12 +234,10 @@ class V23 extends Migration
'buildLogs',
'totalSize',
];
foreach ($attributes as $attribute) {
try {
$this->createAttributeFromCollection($this->dbForProject, $id, $attribute);
} catch (\Throwable $th) {
Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}");
}
try {
$this->createAttributesFromCollection($this->dbForProject, $id, $attributes);
} catch (\Throwable $th) {
Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}");
}
$indexes = [