Skip to content

Commit f3f8bac

Browse files
updated
1 parent 8108e0b commit f3f8bac

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/Migration/Resources/Database/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static function fromArray(array $array): self
5353
Database::fromArray($array['database']),
5454
name: $array['name'],
5555
id: $array['id'],
56-
rowSecurity: $array['rowSecurity'] ?? $array['documentSecurity'],
56+
rowSecurity: (bool) ($array['rowSecurity'] ?? $array['documentSecurity'] ?? false),
5757
permissions: $array['permissions'] ?? [],
5858
createdAt: $array['createdAt'] ?? '',
5959
updatedAt: $array['updatedAt'] ?? '',

src/Migration/Sources/Appwrite.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,10 +928,12 @@ private function exportEntities(string $databaseName, int $batchSize): void
928928

929929
$response = $this->reader->listTables($database, $queries);
930930
foreach ($response as $table) {
931+
$rowSecurity = $table['rowSecurity'] ?? $table['documentSecurity'] ?? false;
931932
$newTable = self::getEntity($databaseName, [
932933
'id' => $table['$id'],
933934
'name' => $table['name'],
934-
'documentSecurity' => $table['documentSecurity'],
935+
'rowSecurity' => $rowSecurity,
936+
'documentSecurity' => $rowSecurity,
935937
'permissions' => $table['$permissions'],
936938
'createdAt' => $table['$createdAt'],
937939
'updatedAt' => $table['$updatedAt'],

0 commit comments

Comments
 (0)