mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
chore: restore V22 migration and V19 response filter
Historical migrations and response filters stay as released.
This commit is contained in:
1 parent
4ad7a8d23b
commit
a0cd16e44d
2 files changed
+22
No files matched your search
@@ -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']);
|
||||
|
||||
Reference in new issue
Block a user