1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-06 02:04:04 +00:00

Delete single-call DB transactions

This commit is contained in:
lukinovec 2023-05-31 07:38:43 +02:00
parent 8ccc27e8c3
commit 3ef1c38414
3 changed files with 6 additions and 6 deletions

View file

@ -39,7 +39,7 @@ class CreatePostgresUserForTenant implements ShouldQueue
// Create the user only if it doesn't already exist
if (! count(DB::select("SELECT usename FROM pg_user WHERE usename = '$name';")) > 0) {
DB::transaction(fn () => DB::statement("CREATE USER \"$name\" LOGIN PASSWORD '$password';"));
DB::statement("CREATE USER \"$name\" LOGIN PASSWORD '$password';");
}
$this->grantPermissions((string) $name);