diff --git a/NixSupport/nixosModules/appWithPostgres.nix b/NixSupport/nixosModules/appWithPostgres.nix index 9933dd605..5eb82f380 100644 --- a/NixSupport/nixosModules/appWithPostgres.nix +++ b/NixSupport/nixosModules/appWithPostgres.nix @@ -69,6 +69,7 @@ in CREATE DATABASE ${cfg.databaseName} OWNER ${cfg.databaseUser}; GRANT ALL PRIVILEGES ON DATABASE ${cfg.databaseName} TO "${cfg.databaseUser}"; \connect ${cfg.databaseName} + SET USER ${cfg.databaseUser}; CREATE TABLE IF NOT EXISTS schema_migrations (revision BIGINT NOT NULL UNIQUE); \i ${ihp}/lib/IHP/IHPSchema.sql \i ${cfg.schema}