1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 19:24:02 +00:00

move dump

This commit is contained in:
lukinovec 2023-06-16 10:04:51 +02:00
parent eb5829175e
commit a9b8f1a299

View file

@ -21,6 +21,8 @@ class CreateRLSPoliciesForTenantTables extends Command
{
tenancy()->getModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
dump('success', DB::select('SELECT * FROM pg_policies'));
return Command::SUCCESS;
}
@ -59,10 +61,6 @@ class CreateRLSPoliciesForTenantTables extends Command
)");
dump(DB::select('SELECT * FROM pg_policies'));
DB::statement("CREATE POLICY {$table}_rls_policy ON {$table} USING ({$tenantKey}::TEXT = current_user);");
dd(DB::select('SELECT * FROM pg_policies'));
$this->enableRls($table);
$this->components->info("Created RLS policy for table '$table'");