Skip to content

Commit

Permalink
deploy-to-nixos: Fixed database being used before it has been created
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Feb 10, 2024
1 parent ff39455 commit 9d1e09b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion NixSupport/nixosModules/appWithPostgres.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ in
enable = true;
initialScript = pkgs.writeText "ihp-initScript" ''
CREATE USER ${cfg.databaseUser};
GRANT ALL PRIVILEGES ON DATABASE ${cfg.databaseName} TO "${cfg.databaseUser}";
CREATE DATABASE ${cfg.databaseName} OWNER ${cfg.databaseUser};
GRANT ALL PRIVILEGES ON DATABASE ${cfg.databaseName} TO "${cfg.databaseUser}";
\connect ${cfg.databaseName}
CREATE TABLE IF NOT EXISTS schema_migrations (revision BIGINT NOT NULL UNIQUE);
\i ${ihp}/lib/IHP/IHPSchema.sql
Expand Down

0 comments on commit 9d1e09b

Please sign in to comment.