1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 22:54:03 +00:00

Put DROP OWNED BY into try/catch

This commit is contained in:
lukinovec 2025-01-14 15:32:36 +01:00
parent 387c5ce1ae
commit f836610819

View file

@ -543,7 +543,10 @@ test('user without BYPASSRLS can only query owned tables if forceRls is true', f
// Drop all tables created in beforeEach
DB::statement("DROP TABLE authors, categories, posts, comments, reactions, articles;");
DB::statement("DROP OWNED BY administrator;");
try {
DB::statement("DROP OWNED BY administrator;");
} catch (\Throwable $th) {}
DB::statement("DROP USER IF EXISTS administrator;");
// Create new central user (without superuser and bypassrls privileges)