chore: restore V22 migration and V19 response filter

Historical migrations and response filters stay as released.
This commit is contained in:
harsh mahajan committed 2026-09-15 14:15:52 +05:30
1 parent 4ad7a8d23b
commit a0cd16e44d
2 files changed
+22

No files matched your search

+14
View File
@@ -76,6 +76,9 @@ class V22 extends Migration
case '_metadata':
$this->createCollection('sites');
$this->createCollection('resourceTokens');
if ($projectInternalId === 'console') {
$this->createCollection('devKeys');
}
break;
case 'identities':
$attributes = [
@@ -89,6 +92,17 @@ class V22 extends Migration
}
$this->dbForProject->purgeCachedCollection($id);
break;
case 'projects':
try {
$attributes = [
'devKeys',
];
$this->createAttributesFromCollection($this->dbForProject, $id, $attributes);
} catch (\Throwable $th) {
Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}");
}
$this->dbForProject->purgeCachedCollection($id);
break;
case 'rules':
$attributes = [
'type',
@@ -21,6 +21,8 @@ class V19 extends Filter
Response::MODEL_PROXY_RULE_LIST => $this->handleList($content, 'rules', fn ($item) => $this->parseProxyRule($item)),
Response::MODEL_MIGRATION => $this->parseMigration($content),
Response::MODEL_MIGRATION_LIST => $this->handleList($content, 'migrations', fn ($item) => $this->parseMigration($item)),
Response::MODEL_PROJECT => $this->parseProject($content),
Response::MODEL_PROJECT_LIST => $this->handleList($content, 'projects', fn ($item) => $this->parseProject($item)),
Response::MODEL_PROVIDER_REPOSITORY => $this->parseProviderRepository($content),
Response::MODEL_TEMPLATE_VARIABLE => $this->parseTemplateVariable($content),
Response::MODEL_VARIABLE => $this->parseVariable($content),
@@ -75,6 +77,12 @@ class V19 extends Filter
return $content;
}
protected function parseProject(array $content)
{
unset($content['devKeys']);
return $content;
}
protected function parseProviderRepository(array $content)
{
unset($content['runtime']);