Skip to content

Commit

Permalink
Merge pull request #1517 from cachix/fix-1509
Browse files Browse the repository at this point in the history
postgres: create role without requiring a schema
  • Loading branch information
domenkozar authored Oct 10, 2024
2 parents e7a0bc5 + 788df37 commit 151a82a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/services/postgres.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 $$
Expand Down

0 comments on commit 151a82a

Please sign in to comment.