mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
revert: backups endpoints
This commit is contained in:
@@ -628,7 +628,6 @@ App::init()
|
||||
$queueForFunctions->setPlatform($platform);
|
||||
$queueForBuilds->setPlatform($platform);
|
||||
$queueForMails->setPlatform($platform);
|
||||
$queueForMigrations->setPlatform($platform);
|
||||
|
||||
// Clone the queues, to prevent events triggered by the database listener
|
||||
// from overwriting the events that are supposed to be triggered in the shutdown hook.
|
||||
|
||||
@@ -52,8 +52,6 @@ class Migrations extends Action
|
||||
|
||||
protected array $plan;
|
||||
|
||||
protected array $platform;
|
||||
|
||||
/**
|
||||
* @var array<string, int>
|
||||
*/
|
||||
@@ -108,7 +106,6 @@ class Migrations extends Action
|
||||
$this->deviceForMigrations = $deviceForMigrations;
|
||||
$this->deviceForFiles = $deviceForFiles;
|
||||
$this->plan = $plan;
|
||||
$this->platform = $payload['platform'] ?? [];
|
||||
|
||||
if (empty($payload)) {
|
||||
throw new Exception('Missing payload');
|
||||
@@ -144,7 +141,6 @@ class Migrations extends Action
|
||||
$credentials = $migration->getAttribute('credentials');
|
||||
$migrationOptions = $migration->getAttribute('options');
|
||||
$dataSource = Appwrite::SOURCE_API;
|
||||
$endpoint = $this->platform['endpoint'] ?: ($credentials['endpoint'] ?? 'http://appwrite.test/v1');
|
||||
$database = null;
|
||||
$queries = [];
|
||||
|
||||
@@ -178,7 +174,7 @@ class Migrations extends Action
|
||||
),
|
||||
SourceAppwrite::getName() => new SourceAppwrite(
|
||||
$credentials['projectId'],
|
||||
$endpoint,
|
||||
$credentials['endpoint'] === 'http://localhost/v1' ? 'http://appwrite/v1' : $credentials['endpoint'],
|
||||
$credentials['apiKey'],
|
||||
$dataSource,
|
||||
$database,
|
||||
@@ -209,7 +205,7 @@ class Migrations extends Action
|
||||
return match ($destination) {
|
||||
DestinationAppwrite::getName() => new DestinationAppwrite(
|
||||
$this->project->getId(),
|
||||
$this->platform['endpoint'],
|
||||
'http://appwrite/v1',
|
||||
$apiKey,
|
||||
$this->dbForProject,
|
||||
Config::getParam('collections', [])['databases']['collections'],
|
||||
@@ -313,7 +309,7 @@ class Migrations extends Action
|
||||
) {
|
||||
$credentials = $migration->getAttribute('credentials', []);
|
||||
$credentials['projectId'] = $credentials['projectId'] ?? $project->getId();
|
||||
$credentials['endpoint'] = $credentials['endpoint'] ?? $this->platform['endpoint'];
|
||||
$credentials['endpoint'] = $credentials['endpoint'] ?? 'http://appwrite/v1';
|
||||
$credentials['apiKey'] = $credentials['apiKey'] ?? $tempAPIKey;
|
||||
$migration->setAttribute('credentials', $credentials);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user