diff --git a/composer.lock b/composer.lock index c9a993377..3bf6f962b 100644 --- a/composer.lock +++ b/composer.lock @@ -5677,5 +5677,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.2.0" } diff --git a/src/Appwrite/Migration/Version/V19.php b/src/Appwrite/Migration/Version/V19.php index b0fcaddd8..1f23c9596 100644 --- a/src/Appwrite/Migration/Version/V19.php +++ b/src/Appwrite/Migration/Version/V19.php @@ -28,7 +28,7 @@ class V19 extends Migration Console::log('Migrating Project: ' . $this->project->getAttribute('name') . ' (' . $this->project->getId() . ')'); $this->projectDB->setNamespace("_{$this->project->getInternalId()}"); - $this->alterPermissionIndex('_' . $this->project->getInternalId() . '__metadata'); + $this->alterPermissionIndex('_metadata'); Console::info('Migrating Databases'); $this->migrateDatabases(); @@ -77,7 +77,6 @@ class V19 extends Migration $this->alterPermissionIndex($id); - usleep(50000); } } @@ -143,7 +142,7 @@ class V19 extends Migration protected function alterPermissionIndex($collectionName): void { - $collectionName = "`{$this->projectDB->getDefaultDatabase()}`.`{$collectionName}_perms`"; + $collectionName = "`{$this->projectDB->getDefaultDatabase()}`.`'_{$this->project->getInternalId()}_{$collectionName}_perms`"; try { $this->pdo->prepare("ALTER TABLE {$collectionName}