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'");