diff --git a/src/Commands/CreateRLSPoliciesForTenantTables.php b/src/Commands/CreateRLSPoliciesForTenantTables.php index ab81274e..912a216e 100644 --- a/src/Commands/CreateRLSPoliciesForTenantTables.php +++ b/src/Commands/CreateRLSPoliciesForTenantTables.php @@ -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'"); } }