chucknorris / roundhouse

RoundhousE is a Database Migration Utility for .NET using sql files and versioning based on source control
http://projectroundhouse.org
917 stars 249 forks source link

Database name is incorrectly identified for Azure PostgreSQL #452

Open DmitrySenin opened 2 years ago

DmitrySenin commented 2 years ago

When running RoundhousE against Azure Database providing connection string via /connstring parameter, it incorrectly identifies database name (uses server name).

/connstring="Host=test.postgres.database.azure.com;Database=Roundhouse;User ID=postgres;Password=;"

STR: Execute roundhouse against Azure PostgreSQL Database server

REASON: This piece of code parses the connection string using "keywords" like Host, Database but in azure the server URL does contain 'Database' and the logic breaks I suppose NpgsqlConnection can be used to parse the string properly

WORKAROUND: If Database goes first in the connection string then the problem can be avoided. So something like this "Database=Roundhouse;Host=test.postgres.database.azure.com;User ID=postgres;Password=;" works