node-pg-migrate
node-pg-migrate copied to clipboard
Password with `?` causes "Invalid URL" throw
Hello, apparently when your password is generated with question mark it throws..
await migrate.default({
// eslint-disable-next-line max-len
databaseUrl: `postgres://${RDS_USER}:${RDS_PASSWORD}@${RDS_HOST}:${RDS_PORT}/db_name`,
dir: 'migrations',
direction: process.env.MIGRATION_DIRECTION || 'up',
migrationsTable: 'migrations',
count: process.env.MIGRATE_COUNT || 100,
});
which produces in my case URL like
postgres://user:pass?word@hosting:5432/db_name