From 788df37f39469b4e0ecd6cc17593f26248e9be54 Mon Sep 17 00:00:00 2001 From: Sander Date: Thu, 10 Oct 2024 18:37:52 +0400 Subject: [PATCH] postgres: create role without requiring a schema --- src/modules/services/postgres.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/services/postgres.nix b/src/modules/services/postgres.nix index ba7fcbc2c..e38e16717 100644 --- a/src/modules/services/postgres.nix +++ b/src/modules/services/postgres.nix @@ -47,7 +47,7 @@ let if [ 1 -ne "$dbAlreadyExists" ]; then echo "Creating database: ${database.name}" echo 'CREATE DATABASE "${database.name}";' | psql --dbname postgres - ${lib.optionalString (database.schema != null && database.user != null && database.pass != null) '' + ${lib.optionalString (database.user != null && database.pass != null) '' echo "Creating role ${database.user}..." psql --dbname postgres <<'EOF' DO $$