mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 17:14:03 +00:00
Delete complete todos
This commit is contained in:
parent
ed688b6f87
commit
5aed290de6
1 changed files with 0 additions and 2 deletions
|
|
@ -38,8 +38,6 @@ class CreatePostgresUserForTenant implements ShouldQueue
|
||||||
$password = $this->tenant->database()->getPassword() ?? 'password';
|
$password = $this->tenant->database()->getPassword() ?? 'password';
|
||||||
|
|
||||||
// Create the user only if it doesn't already exist
|
// Create the user only if it doesn't already exist
|
||||||
// todo1 Create permissions for the user (e.g. permission to create records)
|
|
||||||
// todo1 Switch to the Postgres user on TenancyInitialized (purge central DB connection, change credentials in database.connections.pgsql, change database.connections.central to the pgsql connection)
|
|
||||||
if (! count(DB::select("SELECT usename FROM pg_user WHERE usename = '$name';")) > 0) {
|
if (! count(DB::select("SELECT usename FROM pg_user WHERE usename = '$name';")) > 0) {
|
||||||
DB::statement("CREATE USER \"$name\" LOGIN PASSWORD '$password';");
|
DB::statement("CREATE USER \"$name\" LOGIN PASSWORD '$password';");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue