db-migrate / pg

A postgresql driver for db-migrate.
Other
67 stars 51 forks source link

supporting multiple host in connection string does not work. #55

Closed chandelabhishek closed 4 years ago

chandelabhishek commented 4 years ago

According to PG docs multiple hosts can be supplied in connection string, however db-migrate is not supporting it and parsing it all wrong.

for example: If I supply DATABSE_URL as postgres://user:@localhost:6432,localhost:5432/db_name it is parsing as this:

{
    driver: 'postgres',
    user: 'user',
    password: '',
    database: ':6432,localhost/db_name',
    host: 'localhost',
    port: '5432'
}

However, using psql I am able to log in with same connection string.

chandelabhishek commented 4 years ago

Will open this in node-db-migrate