mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 19:44:04 +00:00
Put DROP OWNED BY into try/catch
This commit is contained in:
parent
387c5ce1ae
commit
f836610819
1 changed files with 4 additions and 1 deletions
|
|
@ -543,7 +543,10 @@ test('user without BYPASSRLS can only query owned tables if forceRls is true', f
|
||||||
// Drop all tables created in beforeEach
|
// Drop all tables created in beforeEach
|
||||||
DB::statement("DROP TABLE authors, categories, posts, comments, reactions, articles;");
|
DB::statement("DROP TABLE authors, categories, posts, comments, reactions, articles;");
|
||||||
|
|
||||||
|
try {
|
||||||
DB::statement("DROP OWNED BY administrator;");
|
DB::statement("DROP OWNED BY administrator;");
|
||||||
|
} catch (\Throwable $th) {}
|
||||||
|
|
||||||
DB::statement("DROP USER IF EXISTS administrator;");
|
DB::statement("DROP USER IF EXISTS administrator;");
|
||||||
|
|
||||||
// Create new central user (without superuser and bypassrls privileges)
|
// Create new central user (without superuser and bypassrls privileges)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue