From 43d167bb48d30c75571b96adbc0d2d096e221092 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Fri, 16 Jun 2023 10:35:44 +0200 Subject: [PATCH] Comment out dropping policies --- src/Commands/CreateRLSPoliciesForTenantTables.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/CreateRLSPoliciesForTenantTables.php b/src/Commands/CreateRLSPoliciesForTenantTables.php index cdcae3e4..3c64dad4 100644 --- a/src/Commands/CreateRLSPoliciesForTenantTables.php +++ b/src/Commands/CreateRLSPoliciesForTenantTables.php @@ -34,7 +34,7 @@ class CreateRLSPoliciesForTenantTables extends Command $table = $model->getTable(); $tenantKey = tenancy()->tenantKeyColumn(); - DB::statement("DROP POLICY IF EXISTS {$table}_rls_policy ON {$table}"); + // DB::statement("DROP POLICY IF EXISTS {$table}_rls_policy ON {$table}"); if (tenancy()->modelBelongsToTenant($model)) { DB::statement("CREATE POLICY {$table}_rls_policy ON {$table} USING ({$tenantKey}::TEXT = current_user);");