From f3f8baca833475563d2437ad9df1f5cbd3f7fab2 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Tue, 21 Apr 2026 17:32:13 +0530 Subject: [PATCH] updated --- src/Migration/Resources/Database/Table.php | 2 +- src/Migration/Sources/Appwrite.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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'],