From abd4772821b9dbe8cfa58ea8503db994ef49b5d8 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Mon, 20 May 2024 12:00:58 +0900 Subject: [PATCH] Run Linters --- app/controllers/api/migrations.php | 4 ++-- src/Appwrite/Event/Migration.php | 8 ++++---- src/Appwrite/Platform/Workers/Migrations.php | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/app/controllers/api/migrations.php b/app/controllers/api/migrations.php index 4dedba1b46..bd5ee38e5c 100644 --- a/app/controllers/api/migrations.php +++ b/app/controllers/api/migrations.php @@ -58,9 +58,9 @@ $triggerMigration = function (string $migrationId, array $resources, Migration $ 'resourceData' => '', 'errors' => [] ]); - + $dbForProject->createDocument('groupMigrations', $groupDocument); - + $queueForMigrations ->setType($group) ->setMigration($groupDocument) diff --git a/src/Appwrite/Event/Migration.php b/src/Appwrite/Event/Migration.php index 3d330c5ccf..c2abf5497e 100644 --- a/src/Appwrite/Event/Migration.php +++ b/src/Appwrite/Event/Migration.php @@ -11,10 +11,10 @@ class Migration extends Event protected string $type = ''; protected ?Document $migration = null; - const TYPE_AUTH = 'Auth'; - const TYPE_DATABASES = 'Databases'; - const TYPE_STORAGE = 'Storage'; - const TYPE_FUNCTIONS = 'Functions'; + public const TYPE_AUTH = 'Auth'; + public const TYPE_DATABASES = 'Databases'; + public const TYPE_STORAGE = 'Storage'; + public const TYPE_FUNCTIONS = 'Functions'; public function __construct(protected Connection $connection) { diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 69675d800b..043465b4b2 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -17,7 +17,6 @@ use Utopia\Database\Exception\Structure; use Utopia\Database\Helpers\ID; use Utopia\Database\Query; use Utopia\Logger\Log; -use Utopia\Logger\Log\Breadcrumb; use Utopia\Migration\Destinations\Appwrite as DestinationsAppwrite; use Utopia\Migration\Exception as MigrationException; use Utopia\Migration\Source; @@ -337,7 +336,7 @@ class Migrations extends Action $group->setAttribute('status', 'completed'); $this->updateMigrationDocument($group, $project); - + // Check if all other groups are finished, if so set parent document to completed aswell. $groupDocuments = $this->dbForProject->find('groupMigrations', [Query::equal('migrationId', [$migration->getId()])]);