You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I've got the following issue when using Evolve 2.0 and PostgreSQL 10.5 that is run inside a docker container.
Migration fails with the following exception:
Database migration failed.System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Evolve.Dialect.PostgreSQL.PostgreSQLSchema..ctor(String schemaName, WrappedConnection wrappedConnection)
at Evolve.Dialect.PostgreSQL.PostgreSQLDatabase.GetSchema(String schemaName)
at Evolve.Evolve.ManageSchemas(DatabaseHelper db)
at Evolve.Evolve.InternalExecuteCommand(Action`1 commandAction)
The problem is that "SHOW server_version;" returns:
10.5 (Debian 10.5-2.pgdg90+1)
and the code in the constructor of PostgreSQLSchema:
var version = _wrappedConnection.QueryForString("SHOW server_version;").Split('.');
MajorVersion = int.Parse(version[0]);
MinorVersion = int.Parse(version[1]);
obviously fails on parsing such a version string.
I'm running x64 version of Windows 10, using .NET Framework 4.7.2, Docker 18.09.2 and postgres:10.5 image.
The text was updated successfully, but these errors were encountered:
server_version_num is an integer according to the docs, whereas server_version is a string, so server_version_num might be more suitable for extracting the major and minor version.
And it seems the issue only affects the Debian based PostgreSQL containers. In case of the Alpine based counterparts, server_version returns just the major and minor version and not any addition string.
Hi,
I've got the following issue when using Evolve 2.0 and PostgreSQL 10.5 that is run inside a docker container.
Migration fails with the following exception:
Database migration failed.System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Evolve.Dialect.PostgreSQL.PostgreSQLSchema..ctor(String schemaName, WrappedConnection wrappedConnection)
at Evolve.Dialect.PostgreSQL.PostgreSQLDatabase.GetSchema(String schemaName)
at Evolve.Evolve.ManageSchemas(DatabaseHelper db)
at Evolve.Evolve.InternalExecuteCommand(Action`1 commandAction)
The problem is that "SHOW server_version;" returns:
10.5 (Debian 10.5-2.pgdg90+1)
and the code in the constructor of PostgreSQLSchema:
var version = _wrappedConnection.QueryForString("SHOW server_version;").Split('.');
MajorVersion = int.Parse(version[0]);
MinorVersion = int.Parse(version[1]);
obviously fails on parsing such a version string.
I'm running x64 version of Windows 10, using .NET Framework 4.7.2, Docker 18.09.2 and postgres:10.5 image.
The text was updated successfully, but these errors were encountered: