From c03ab7937bdb89af61949bfa8fbde4b67c0a9ba9 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Tue, 14 Jan 2025 15:10:51 +0100 Subject: [PATCH] Move DROP TABLE statement --- tests/RLS/TableManagerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/RLS/TableManagerTest.php b/tests/RLS/TableManagerTest.php index e4942a88..ee3f6cf4 100644 --- a/tests/RLS/TableManagerTest.php +++ b/tests/RLS/TableManagerTest.php @@ -540,12 +540,12 @@ test('table rls manager generates relationship trees with tables related to the test('user without BYPASSRLS can only query owned tables if forceRls is true', function(bool $forceRls) { CreateUserWithRLSPolicies::$forceRls = $forceRls; + // Drop all tables created in beforeEach + DB::statement("DROP TABLE authors, categories, posts, comments, reactions, articles;"); + try { DB::statement("DROP OWNED BY administrator;"); DB::statement("DROP USER IF EXISTS administrator;"); - - // Drop all tables created in beforeEach - DB::statement("DROP TABLE authors, categories, posts, comments, reactions;"); } catch (\Throwable $th) { }