1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 21:14:02 +00:00
This commit is contained in:
lukinovec 2023-06-15 13:36:26 +02:00
parent 9e9e81b69c
commit f0b31d1820

View file

@ -45,6 +45,7 @@ class CreateRLSPoliciesForTenantTables extends Command
} }
if (tenancy()->modelBelongsToTenantIndirectly($model)) { if (tenancy()->modelBelongsToTenantIndirectly($model)) {
dump("creating {$table}_rls_policy");
/** @phpstan-ignore-next-line */ /** @phpstan-ignore-next-line */
$parentName = $model->getRelationshipToPrimaryModel(); $parentName = $model->getRelationshipToPrimaryModel();
$parentKey = $model->$parentName()->getForeignKeyName(); $parentKey = $model->$parentName()->getForeignKeyName();
@ -62,7 +63,11 @@ class CreateRLSPoliciesForTenantTables extends Command
) )
)"); )");
dump("{$table}_rls_policy created");
$this->enableRls($table); $this->enableRls($table);
$this->components->info("Created RLS policy for table '$table'");
} }
} }