mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 19:14:03 +00:00
Check RLS tables
This commit is contained in:
parent
e024701ab9
commit
796a251b7d
1 changed files with 2 additions and 0 deletions
|
|
@ -19,7 +19,9 @@ class CreateRLSPoliciesForTenantTables extends Command
|
||||||
|
|
||||||
public function handle(): int
|
public function handle(): int
|
||||||
{
|
{
|
||||||
|
dump('Current RLS tables', DB::select('SELECT * FROM pg_policies'));
|
||||||
tenancy()->getModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
|
tenancy()->getModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
|
||||||
|
dump('RLS tables created', DB::select('SELECT * FROM pg_policies'));
|
||||||
|
|
||||||
return Command::SUCCESS;
|
return Command::SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue