node-pg-migrate icon indicating copy to clipboard operation
node-pg-migrate copied to clipboard

Password with `?` causes "Invalid URL" throw

Open bmxpiku opened this issue 1 year ago • 0 comments

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 image

bmxpiku avatar Nov 08 '23 11:11 bmxpiku