I’m using node-pg-migrate for my migrations, and I’ve set up my .env file with a custom database name, but when I run the migration command, it always tries to connect to a database with my PC’s admin username and throws the error that this database does not exist.
I’ve confirmed that the correct environment variables are being loaded and that the database exists with the correct name. Here’s the error I’m getting:
could not connect to postgres: error: database "<My-pc-username>" does not exist
I’ve tried running the migration with the correct database name in the DB_NAME field, but it still defaults to my PC username. Does anyone know why it’s not picking up the right database or how to resolve this?
3