Skip to content

Commit

Permalink
deploy-to-nixos: Switch to the right user before creating tables
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Feb 10, 2024
1 parent 9d1e09b commit 2b297b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions NixSupport/nixosModules/appWithPostgres.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 2b297b2

Please sign in to comment.