Fix executions migrations
This commit is contained in:
parent
9aeb15c337
commit
87b0851092
1 changed files with 35 additions and 8 deletions
|
@ -295,16 +295,31 @@ class V19 extends Migration
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'executions':
|
case 'executions':
|
||||||
|
$attributesToCreate = [
|
||||||
|
'functionInternalId',
|
||||||
|
'deploymentInternalId',
|
||||||
|
'requestMethod',
|
||||||
|
'requestPath',
|
||||||
|
'requestHeaders',
|
||||||
|
'responseHeaders',
|
||||||
|
];
|
||||||
|
foreach ($attributesToCreate as $attribute) {
|
||||||
try {
|
try {
|
||||||
$this->createAttributeFromCollection($this->projectDB, $id, 'functionInternalId');
|
$this->createAttributeFromCollection($this->projectDB, $id, $attribute);
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
Console::warning("'functionInternalId' from {$id}: {$th->getMessage()}");
|
Console::warning("$attribute from {$id}: {$th->getMessage()}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$attributesToDelete = [
|
||||||
|
'response'
|
||||||
|
];
|
||||||
|
foreach ($attributesToDelete as $attribute) {
|
||||||
try {
|
try {
|
||||||
$this->createAttributeFromCollection($this->projectDB, $id, 'deploymentInternalId');
|
$this->projectDB->deleteAttribute($id, $attribute);
|
||||||
} catch (\Throwable $th) {
|
} catch (\Throwable $th) {
|
||||||
Console::warning("'deploymentInternalId' from {$id}: {$th->getMessage()}");
|
Console::warning("'$attribute' from {$id}: {$th->getMessage()}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -325,6 +340,18 @@ class V19 extends Migration
|
||||||
Console::warning("'responseStatusCode' from {$id}: {$th->getMessage()}");
|
Console::warning("'responseStatusCode' from {$id}: {$th->getMessage()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$this->projectDB->deleteIndex($id, '_key_statusCode');
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
Console::warning("'_key_statusCode' from {$id}: {$th->getMessage()}");
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$this->createIndexFromCollection($this->projectDB, $id, '_key_responseStatusCode');
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
Console::warning("'_key_responseStatusCode' from {$id}: {$th->getMessage()}");
|
||||||
|
}
|
||||||
|
|
||||||
$this->projectDB->deleteCachedCollection($id);
|
$this->projectDB->deleteCachedCollection($id);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue