From a9b8f1a2996402f07b0e8917c3e5a5bc06ccd69e Mon Sep 17 00:00:00 2001 From: lukinovec Date: Fri, 16 Jun 2023 10:04:51 +0200 Subject: [PATCH] move dump --- src/Commands/CreateRLSPoliciesForTenantTables.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Commands/CreateRLSPoliciesForTenantTables.php b/src/Commands/CreateRLSPoliciesForTenantTables.php index 15327f69..72f8122d 100644 --- a/src/Commands/CreateRLSPoliciesForTenantTables.php +++ b/src/Commands/CreateRLSPoliciesForTenantTables.php @@ -21,6 +21,8 @@ class CreateRLSPoliciesForTenantTables extends Command { tenancy()->getModels()->each(fn (Model $model) => $this->useRlsOnModel($model)); + dump('success', DB::select('SELECT * FROM pg_policies')); + return Command::SUCCESS; } @@ -59,10 +61,6 @@ class CreateRLSPoliciesForTenantTables extends Command )"); dump(DB::select('SELECT * FROM pg_policies')); - DB::statement("CREATE POLICY {$table}_rls_policy ON {$table} USING ({$tenantKey}::TEXT = current_user);"); - - dd(DB::select('SELECT * FROM pg_policies')); - $this->enableRls($table); $this->components->info("Created RLS policy for table '$table'");