mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:24:02 +00:00
Try using getModels() outside of DB::transaction()
This commit is contained in:
parent
1fb90129cf
commit
e024701ab9
1 changed files with 1 additions and 3 deletions
|
|
@ -19,9 +19,7 @@ class CreateRLSPoliciesForTenantTables extends Command
|
|||
|
||||
public function handle(): int
|
||||
{
|
||||
DB::transaction(function () {
|
||||
tenancy()->getTenantModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
|
||||
});
|
||||
tenancy()->getModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue