From 253061730ee45ec0fcd7572ed8d9621bfb39e4af Mon Sep 17 00:00:00 2001 From: lukinovec Date: Wed, 10 May 2023 12:48:06 +0200 Subject: [PATCH] Remove UUID constraint from RLS policy --- src/Commands/CreateRLSPoliciesForTenantTables.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/CreateRLSPoliciesForTenantTables.php b/src/Commands/CreateRLSPoliciesForTenantTables.php index 04a1ec92..5a1a2d56 100644 --- a/src/Commands/CreateRLSPoliciesForTenantTables.php +++ b/src/Commands/CreateRLSPoliciesForTenantTables.php @@ -35,7 +35,7 @@ class CreateRLSPoliciesForTenantTables extends Command {$parentKey} IN ( SELECT id FROM {$parentTable} - WHERE ({$tenantKey}::UUID = ( + WHERE ({$tenantKey} = ( SELECT {$tenantKey} FROM {$parentTable} WHERE id = {$parentKey}