Skip to content

Commit ca897da

Browse files
committed
HARMONY-2318: Drop postgres guard
I suppose Sqlite doesn't run migrations.
1 parent 62f7526 commit ca897da

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

db/migrations/20260331171217_create_read_only_user.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
exports.up = async function(knex) {
2-
if (knex.client.config.client !== 'pg') {
3-
return;
4-
}
52

63
const password = process.env.DATABASE_READONLY_PASSWORD;
74
if (!password) {
8-
return;
5+
throw new Error('Unable to create harmony_read_only user: DATABASE_READONLY_PASSWORD variable is not set');
96
}
107

118
const { rows } = await knex.raw(
@@ -23,9 +20,6 @@ exports.up = async function(knex) {
2320
};
2421

2522
exports.down = async function(knex) {
26-
if (knex.client.config.client !== 'pg') {
27-
return;
28-
}
2923

3024
const { rows } = await knex.raw(
3125
`SELECT 1 FROM pg_catalog.pg_roles WHERE rolname = 'harmony_read_only'`

0 commit comments

Comments
 (0)