mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Merge pull request #12702 from appwrite/fix/v24-provider-triggers-main
Complete V24 schema migrations
This commit is contained in:
1 file changed
+45
@@ -121,6 +121,12 @@ class V24 extends Migration
|
||||
} catch (Throwable $th) {
|
||||
Console::warning('Failed to create attributes "' . \implode(', ', $attributes) . "\" in collection {$id}: {$th->getMessage()}");
|
||||
}
|
||||
|
||||
try {
|
||||
$this->createIndexFromCollection($this->dbForProject, $id, '_key_teamInternalId');
|
||||
} catch (Throwable $th) {
|
||||
Console::warning("Failed to create index \"_key_teamInternalId\" from {$id}: {$th->getMessage()}");
|
||||
}
|
||||
}
|
||||
$this->dbForProject->purgeCachedCollection($id);
|
||||
break;
|
||||
@@ -255,6 +261,15 @@ class V24 extends Migration
|
||||
$this->dbForProject->purgeCachedCollection($id);
|
||||
break;
|
||||
|
||||
case 'memberships':
|
||||
try {
|
||||
$this->createIndexFromCollection($this->dbForProject, $id, '_key_team_confirm');
|
||||
} catch (Throwable $th) {
|
||||
Console::warning("Failed to create index \"_key_team_confirm\" from {$id}: {$th->getMessage()}");
|
||||
}
|
||||
$this->dbForProject->purgeCachedCollection($id);
|
||||
break;
|
||||
|
||||
case 'tokens':
|
||||
try {
|
||||
$this->createIndexFromCollection($this->dbForProject, $id, '_key_type_expire');
|
||||
@@ -281,6 +296,8 @@ class V24 extends Migration
|
||||
'startCommand',
|
||||
'buildSpecification',
|
||||
'runtimeSpecification',
|
||||
'providerBranches',
|
||||
'providerPaths',
|
||||
];
|
||||
try {
|
||||
$this->createAttributesFromCollection($this->dbForProject, $id, $attributes);
|
||||
@@ -296,6 +313,8 @@ class V24 extends Migration
|
||||
'deploymentRetention',
|
||||
'buildSpecification',
|
||||
'runtimeSpecification',
|
||||
'providerBranches',
|
||||
'providerPaths',
|
||||
];
|
||||
try {
|
||||
$this->createAttributesFromCollection($this->dbForProject, $id, $attributes);
|
||||
@@ -337,6 +356,32 @@ class V24 extends Migration
|
||||
$this->dbForProject->purgeCachedCollection($id);
|
||||
break;
|
||||
|
||||
case 'platforms':
|
||||
case 'webhooks':
|
||||
if ($collectionType === 'console') {
|
||||
try {
|
||||
$this->createIndexFromCollection($this->dbForProject, $id, '_key_project_id');
|
||||
} catch (Throwable $th) {
|
||||
Console::warning("Failed to create index \"_key_project_id\" from {$id}: {$th->getMessage()}");
|
||||
}
|
||||
}
|
||||
$this->dbForProject->purgeCachedCollection($id);
|
||||
break;
|
||||
|
||||
case 'reports':
|
||||
case 'insights':
|
||||
if ($collectionType === 'console') {
|
||||
try {
|
||||
$this->createCollection($id);
|
||||
} catch (Throwable $th) {
|
||||
Console::warning("Failed to create collection \"{$id}\": {$th->getMessage()}");
|
||||
|
||||
throw $th;
|
||||
}
|
||||
}
|
||||
$this->dbForProject->purgeCachedCollection($id);
|
||||
break;
|
||||
|
||||
case 'providers':
|
||||
try {
|
||||
$this->dbForProject->deleteIndex($id, '_key_name');
|
||||
|
||||
Reference in new issue
Block a user