mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:24:02 +00:00
debug
This commit is contained in:
parent
9e9e81b69c
commit
f0b31d1820
1 changed files with 5 additions and 0 deletions
|
|
@ -45,6 +45,7 @@ class CreateRLSPoliciesForTenantTables extends Command
|
|||
}
|
||||
|
||||
if (tenancy()->modelBelongsToTenantIndirectly($model)) {
|
||||
dump("creating {$table}_rls_policy");
|
||||
/** @phpstan-ignore-next-line */
|
||||
$parentName = $model->getRelationshipToPrimaryModel();
|
||||
$parentKey = $model->$parentName()->getForeignKeyName();
|
||||
|
|
@ -62,7 +63,11 @@ class CreateRLSPoliciesForTenantTables extends Command
|
|||
)
|
||||
)");
|
||||
|
||||
dump("{$table}_rls_policy created");
|
||||
|
||||
$this->enableRls($table);
|
||||
|
||||
$this->components->info("Created RLS policy for table '$table'");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue