Additional updates from index changes
This commit is contained in:
parent
8ebfbf04b8
commit
7e6eb59cdf
|
@ -369,7 +369,7 @@ abstract class Migration
|
||||||
$indexKey = array_search($indexId, array_column($indexes, '$id'));
|
$indexKey = array_search($indexId, array_column($indexes, '$id'));
|
||||||
|
|
||||||
if ($indexKey === false) {
|
if ($indexKey === false) {
|
||||||
throw new Exception("Attribute {$indexId} not found");
|
throw new Exception("Index {$indexId} not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
$index = $indexes[$indexKey];
|
$index = $indexes[$indexKey];
|
||||||
|
|
|
@ -487,7 +487,7 @@ class V19 extends Migration
|
||||||
$this->projectDB->deleteIndex($id, '_key_uniqueKey');
|
$this->projectDB->deleteIndex($id, '_key_uniqueKey');
|
||||||
$this->projectDB->deleteCachedCollection($id);
|
$this->projectDB->deleteCachedCollection($id);
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
Console::warning("'_key_function' from {$id}: {$th->getMessage()}");
|
Console::warning("'_key_uniqueKey' from {$id}: {$th->getMessage()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -508,12 +508,12 @@ class V19 extends Migration
|
||||||
$this->projectDB->renameAttribute($id, 'functionId', 'resourceId');
|
$this->projectDB->renameAttribute($id, 'functionId', 'resourceId');
|
||||||
$this->projectDB->deleteCachedCollection($id);
|
$this->projectDB->deleteCachedCollection($id);
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
Console::warning("'resourceInternalId' from {$id}: {$th->getMessage()}");
|
Console::warning("'resourceId' from {$id}: {$th->getMessage()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
$indexesToCreate = [
|
$indexesToCreate = [
|
||||||
'_key_resourceInternalId',
|
'_key_resourceInternalId',
|
||||||
'_key_resourceId',
|
'_key_resourceId_resourceType',
|
||||||
'_key_resourceType',
|
'_key_resourceType',
|
||||||
'_key_uniqueKey',
|
'_key_uniqueKey',
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue