From 796a251b7d09485b81b4040e1d590d9e058c7d74 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Fri, 16 Jun 2023 09:28:38 +0200 Subject: [PATCH] Check RLS tables --- src/Commands/CreateRLSPoliciesForTenantTables.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Commands/CreateRLSPoliciesForTenantTables.php b/src/Commands/CreateRLSPoliciesForTenantTables.php index 81509a21..7d346521 100644 --- a/src/Commands/CreateRLSPoliciesForTenantTables.php +++ b/src/Commands/CreateRLSPoliciesForTenantTables.php @@ -19,7 +19,9 @@ class CreateRLSPoliciesForTenantTables extends Command public function handle(): int { + dump('Current RLS tables', DB::select('SELECT * FROM pg_policies')); tenancy()->getModels()->each(fn (Model $model) => $this->useRlsOnModel($model)); + dump('RLS tables created', DB::select('SELECT * FROM pg_policies')); return Command::SUCCESS; }