From 910da724e4d8395a9a1e4c8738adc260915c49a9 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Wed, 26 Apr 2023 14:02:18 +0200 Subject: [PATCH] WIP --- tests/PostgresTest.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/PostgresTest.php b/tests/PostgresTest.php index 3b5c6bef..9b186088 100644 --- a/tests/PostgresTest.php +++ b/tests/PostgresTest.php @@ -52,14 +52,6 @@ test('correct rls policies get created using the command', function() { ], ]); - $tableExists = DB::selectOne('SELECT EXISTS ( - SELECT 1 - FROM pg_tables - WHERE schemaname = ? AND tablename = ? - ) AS table_exists;', ['pg_catalog', 'pg_policies'])->table_exists; - - dump($tableExists); - $getRlsPolicies = fn () => DB::select('select * from pg_policies'); $getModelTables = fn () => collect(config('tenancy.models.rls'))->map(fn (string $model) => (new $model)->getTable()); $getRlsTables = fn() => $getModelTables()->map(fn ($table) => DB::select('select relname, relrowsecurity, relforcerowsecurity from pg_class WHERE oid = ' . "'$table'::regclass"))->collapse();