1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 19:24:02 +00:00

Check RLS tables

This commit is contained in:
lukinovec 2023-06-16 09:28:38 +02:00
parent e024701ab9
commit 796a251b7d

View file

@ -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;
}