The lack of DATABASE_URL
doesn't stop migrating
#1220
Labels
c: bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
p: 1-normal
Nothing urgent
Milestone
Describe the bug
Based on #319,
node-pg-migrate
should refuse to try and migrate ifDATABASE_URL
is not set.However, even in an environment where there's absolutely nothing postgres-related, those checks aren't triggered, likely because
pg
synthesizes some default connection parameters – e.g. on my local laptop,or in a Docker container therein, as root,
Since
port
andhost
are set, the checknode-pg-migrate/bin/node-pg-migrate.ts
Line 493 in 9d23d3f
DATABASE_URL
is actually unset, migrations happen... and in my case, I got a bunch of stuff written into my default user database.Steps to reproduce
Simplest repro in a Docker container with nothing Postgres-related:
Logs
No response
System Info
The text was updated successfully, but these errors were encountered: