diff --git a/src/Migration/Destinations/Appwrite.php b/src/Migration/Destinations/Appwrite.php index dc04945..a9e96ba 100644 --- a/src/Migration/Destinations/Appwrite.php +++ b/src/Migration/Destinations/Appwrite.php @@ -313,7 +313,7 @@ protected function createDatabase(Database $resource): bool $validator = new UID(); - if ($validator->isValid($resourceId)) { + if (!$validator->isValid($resourceId)) { throw new Exception( resourceName: $resource->getName(), resourceGroup: $resource->getGroup(), @@ -368,7 +368,7 @@ protected function createCollection(Collection $resource): bool $validator = new UID(); - if ($validator->isValid($resourceId)) { + if (!$validator->isValid($resourceId)) { throw new Exception( resourceName: $resource->getName(), resourceGroup: $resource->getGroup(), @@ -895,7 +895,7 @@ protected function createDocument(Document $resource, bool $isLast): bool { $validator = new UID(); - if ($validator->isValid($resource->getId())) { + if (!$validator->isValid($resource->getId())) { throw new Exception( resourceName: $resource->getName(), resourceGroup: $resource->getGroup(),