mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:24:02 +00:00
Delete dump, put getModels into transaction
This commit is contained in:
parent
bd7f885c23
commit
46b89fd0ec
1 changed files with 3 additions and 2 deletions
|
|
@ -19,7 +19,9 @@ class CreateRLSPoliciesForTenantTables extends Command
|
|||
|
||||
public function handle(): int
|
||||
{
|
||||
tenancy()->getModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
|
||||
DB::transaction(function () {
|
||||
tenancy()->getModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
|
||||
});
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
|
@ -57,7 +59,6 @@ class CreateRLSPoliciesForTenantTables extends Command
|
|||
))
|
||||
)
|
||||
)");
|
||||
dump(DB::select('SELECT * FROM pg_policies'));
|
||||
|
||||
$this->enableRls($table);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue