When trying to run migrations on my dev/local machine, this runs fine:
mono packages/FluentMigrator.Tools.1.6.1/tools/AnyCPU/40/Migrate.exe -a Reflect.Web.v2.Migrations/bin/Debug/Reflect.Web.v2.Migrations.dll -db Postgres -conn "Server=localhost;Port=5432;Database=<redacted>;User Id=<redacted>;Password=<redacted>;CommandTimeout=20;" -profile "Debug"
Outputting this:
[+] Using Database Postgres and Connection String Server=localhost;Port=5432;Database=<redacted>;User Id=<redacted>;Password=********;CommandTimeout=20;
[+] Task completed.
But when running this in production:
mono /app/packages/FluentMigrator.Tools.1.6.1/tools/AnyCPU/40/Migrate.exe -a Reflect.Web.v2.Migrations.dll -db Postgres -conn "Server=dokku-postgres-reflectdb;Port=5432;Database=<redacted>;User Id=<redacted>;Password=<redacted>;CommandTimeout=20;" -profile "Release"
It throws
[+] Using Database Postgres and Connection String Server=dokku-postgres-reflectdb
!!! FATAL: 28000: no PostgreSQL user name specified in startup packet
28000: no PostgreSQL user name specified in startup packet
I tried adding a username param to the connection string, removing the User Id params, etc but to no avail.
You can see that the connection string is not fully visible. Somehow the connection string does not get parsed correctly in production.
Any ideas? :-)