mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Merge remote-tracking branch 'origin/1.6.x' into feat-bulk-operations
This commit is contained in:
commit
bae0676a62
1 changed files with 12 additions and 3 deletions
|
|
@ -34,6 +34,13 @@ class Migrations extends Action
|
|||
|
||||
protected Document $project;
|
||||
|
||||
/**
|
||||
* Cached for performance.
|
||||
*
|
||||
* @var array<string, int>
|
||||
*/
|
||||
protected array $sourceReport = [];
|
||||
|
||||
/**
|
||||
* @var callable
|
||||
*/
|
||||
|
|
@ -101,7 +108,7 @@ class Migrations extends Action
|
|||
$source = $migration->getAttribute('source');
|
||||
$credentials = $migration->getAttribute('credentials');
|
||||
|
||||
return match ($source) {
|
||||
$migrationSource = match ($source) {
|
||||
Firebase::getName() => new Firebase(
|
||||
json_decode($credentials['serviceAccount'], true),
|
||||
),
|
||||
|
|
@ -130,6 +137,10 @@ class Migrations extends Action
|
|||
),
|
||||
default => throw new \Exception('Invalid source type'),
|
||||
};
|
||||
|
||||
$this->sourceReport = $migrationSource->report();
|
||||
|
||||
return $migrationSource;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -245,8 +256,6 @@ class Migrations extends Action
|
|||
$source = $this->processSource($migration);
|
||||
$destination = $this->processDestination($migration, $tempAPIKey);
|
||||
|
||||
$source->report();
|
||||
|
||||
$transfer = new Transfer(
|
||||
$source,
|
||||
$destination
|
||||
|
|
|
|||
Loading…
Reference in a new issue