Fix syntax errors and add projectInternalId constructor param

This commit is contained in:
Prem Palanisamy committed 2026-03-14 23:10:53 +00:00
1 parent 12a4d8eb1d
commit 86843355dc
2 files changed
+15 -1

No files matched your search

+4 -1
View File
@@ -102,6 +102,7 @@ class Appwrite extends Destination
callable $getDatabasesDB,
protected array $collectionStructure,
protected UtopiaDatabase $dbForPlatform,
protected string $projectInternalId,
) {
$this->project = $project;
$this->endpoint = $endpoint;
@@ -2237,7 +2238,7 @@ class Appwrite extends Destination
$this->dbForPlatform->createDocument('platforms', new UtopiaDocument([
'$id' => ID::unique(),
'$permissions' => $resource->getPermissions(),
'projectInternalId' => $this->dbForPlatform->getDocument('projects', $this->project)->getInternalId(),
'projectInternalId' => $this->projectInternalId,
'projectId' => $this->project,
'type' => $resource->getType(),
'name' => $resource->getPlatformName(),
@@ -2255,6 +2256,8 @@ class Appwrite extends Destination
$this->dbForPlatform->purgeCachedDocument('projects', $this->project);
return true;
}
private function validateFieldsForIndexes(Index $resource, UtopiaDocument $table, array &$lengths)
{
/**
+11
View File
@@ -2247,6 +2247,10 @@ class Appwrite extends Source
} catch (\Throwable) {
$report[Resource::TYPE_PLATFORM] = 0;
}
}
}
/**
* @param string $databaseType
* @param array $database {
* id: string,
@@ -2308,6 +2312,10 @@ class Appwrite extends Source
code: $e->getCode(),
previous: $e
));
}
}
/**
* eg., tables,collections
* @param string $databaseType
* @param array{
@@ -2364,6 +2372,9 @@ class Appwrite extends Source
}
$this->callback($platforms);
}
/**
* eg.,documents/attributes
* @param string $databaseType
* @param array{