Skip to content

Commit

Permalink
10391: add master creds to user script
Browse files Browse the repository at this point in the history
  • Loading branch information
pixiwyn committed Sep 4, 2024
1 parent 13094ff commit 5b6fb8b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/postgres/create-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ if (!databaseName) {
}

async function grantPrivileges() {
const db = await connect({ ...POOL });
const db = await connect({
...POOL,
password: process.env.POSTGRES_MASTER_PASSWORD,
user: process.env.POSTGRES_MASTER_USERNAME,
});

try {
await sql`CREATE USER ${sql.raw(userToCreate)} WITH LOGIN;`.execute(db);
Expand Down

0 comments on commit 5b6fb8b

Please sign in to comment.