1
0
Fork 0
mirror of synced 2024-07-03 21:50:34 +12:00

Additional updates from index changes

This commit is contained in:
Steven Nguyen 2023-08-21 17:12:10 -07:00
parent 8ebfbf04b8
commit 7e6eb59cdf
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -369,7 +369,7 @@ abstract class Migration
$indexKey = array_search($indexId, array_column($indexes, '$id'));
if ($indexKey === false) {
throw new Exception("Attribute {$indexId} not found");
throw new Exception("Index {$indexId} not found");
}
$index = $indexes[$indexKey];

View file

@ -487,7 +487,7 @@ class V19 extends Migration
$this->projectDB->deleteIndex($id, '_key_uniqueKey');
$this->projectDB->deleteCachedCollection($id);
} catch (\Throwable $th) {
Console::warning("'_key_function' from {$id}: {$th->getMessage()}");
Console::warning("'_key_uniqueKey' from {$id}: {$th->getMessage()}");
}
try {
@ -508,12 +508,12 @@ class V19 extends Migration
$this->projectDB->renameAttribute($id, 'functionId', 'resourceId');
$this->projectDB->deleteCachedCollection($id);
} catch (\Throwable $th) {
Console::warning("'resourceInternalId' from {$id}: {$th->getMessage()}");
Console::warning("'resourceId' from {$id}: {$th->getMessage()}");
}
$indexesToCreate = [
'_key_resourceInternalId',
'_key_resourceId',
'_key_resourceId_resourceType',
'_key_resourceType',
'_key_uniqueKey',
];