Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaysasidrn committed Sep 16, 2022
2 parents 42a5464 + 85f90f6 commit 883a55a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.25.2
1.25.3
2 changes: 1 addition & 1 deletion server/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.25.2
1.25.3
5 changes: 5 additions & 0 deletions server/scripts/create-database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ function createDatabase(): void {
}
});

if (envVars.PG_DB_OWNER === 'false') {
console.log('Skipping database creation');
return;
}

const createdb =
`PGPASSWORD=${envVars.PG_PASS} createdb ` +
`-h ${envVars.PG_HOST} ` +
Expand Down
2 changes: 2 additions & 0 deletions server/scripts/database-config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function buildDatabaseConfig(): any {
PG_PASS: process.env.PG_PASS,
PG_USER: process.env.PG_USER,
PG_DB: process.env.PG_DB,
PG_DB_OWNER: process.env.PG_DB_OWNER,
};
}

Expand All @@ -27,6 +28,7 @@ function validateDatabaseConfig(dbOptions: any): Joi.ValidationResult {
PG_PASS: Joi.string().default(''),
PG_USER: Joi.string().required(),
PG_DB: Joi.string().default('tooljet_db'),
PG_DB_OWNER: Joi.string().default('true'),
})
.unknown();

Expand Down

0 comments on commit 883a55a

Please sign in to comment.