mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:24:02 +00:00
move dump
This commit is contained in:
parent
eb5829175e
commit
a9b8f1a299
1 changed files with 2 additions and 4 deletions
|
|
@ -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'");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue