2016-05-29 34 views
0

私のdevの/ローカルマシン上でマイグレーションを実行しようとすると、これは正常に動作:FluentMigrator/Postgresの:スタートアップパケットで指定されていないPostgreSQLユーザ名

この出力する
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" 

[+] Using Database Postgres and Connection String Server=localhost;Port=5432;Database=<redacted>;User Id=<redacted>;Password=********;CommandTimeout=20; 
[+] Task completed. 

しかし、ときに生産でこれを実行している:

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" 

それは

をスローします
[+] 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 

接続文字列にユーザー名パラメータを追加し、ユーザーIDパラメータなどを削除してみましたが、役に立たなかった。

あなたは、接続文字列が完全に表示されていないことがわかります。どういうわけか、接続文字列は、生産に正しく解析されません。

アイデア? :-)

答えて

0

私はMigrate.exeを実行して、接続文字列をパラメーターとして直接渡すのではなく、migrationsプロジェクトのapp.config内の接続文字列の名前を渡しました。

Migrate.exe -a Reflect.Web.v2.Migrations.dll -db Postgres -conn "NameOfConnectionString" -profile "Release" 

これは動作します。

関連する問題