diff --git a/src/Migration/Resources/Database/Table.php b/src/Migration/Resources/Database/Table.php index 889d90fe1f..0ba04a5cda 100644 --- a/src/Migration/Resources/Database/Table.php +++ b/src/Migration/Resources/Database/Table.php @@ -53,7 +53,7 @@ class Table extends Resource Database::fromArray($array['database']), name: $array['name'], id: $array['id'], - rowSecurity: $array['rowSecurity'] ?? $array['documentSecurity'], + rowSecurity: (bool) ($array['rowSecurity'] ?? $array['documentSecurity'] ?? false), permissions: $array['permissions'] ?? [], createdAt: $array['createdAt'] ?? '', updatedAt: $array['updatedAt'] ?? '', diff --git a/src/Migration/Sources/Appwrite.php b/src/Migration/Sources/Appwrite.php index 355e40c1e7..6691c6a8ba 100644 --- a/src/Migration/Sources/Appwrite.php +++ b/src/Migration/Sources/Appwrite.php @@ -928,10 +928,12 @@ class Appwrite extends Source $response = $this->reader->listTables($database, $queries); foreach ($response as $table) { + $rowSecurity = $table['rowSecurity'] ?? $table['documentSecurity'] ?? false; $newTable = self::getEntity($databaseName, [ 'id' => $table['$id'], 'name' => $table['name'], - 'documentSecurity' => $table['documentSecurity'], + 'rowSecurity' => $rowSecurity, + 'documentSecurity' => $rowSecurity, 'permissions' => $table['$permissions'], 'createdAt' => $table['$createdAt'], 'updatedAt' => $table['$updatedAt'],