-
-
Notifications
You must be signed in to change notification settings - Fork 71
Scaffolding setup now supports Firebird 2.5 #976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -192,11 +193,20 @@ ORDER BY | |||
|
|||
private void GetColumns(DbConnection connection, IReadOnlyList<DatabaseTable> tables, Func<string, string, bool> tableFilter) | |||
{ | |||
var identity_type = "null"; | |||
|
|||
if (connection.State == ConnectionState.Open) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point connection is known to be open.
|
||
if (connection.State == ConnectionState.Open) | ||
{ | ||
var serverVersion = FbServerProperties.ParseServerVersion(connection.ServerVersion); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this into DatabaseModel Create(DbConnection connection, DatabaseModelFactoryOptions options)
method and create a property for it.
if (connection.State == ConnectionState.Open) | ||
{ | ||
var serverVersion = FbServerProperties.ParseServerVersion(connection.ServerVersion); | ||
if (serverVersion.Major >= 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Store MajorVersionNumber
directly, to make it easier for future.
@SJFriedl Are you going to finish this PR? |
Done via faedc6e. |
I have this error when scaffolding a 2.5 Firebird database: Could not find type mapping for column 'XXXXX' with data type 'NUMERIC(4,2)'. Skipping column. |
Please report bugs by creating new issues, or if you're asking for help, ask on firebird-net-provider |
@mrotteveel He did: #1142. |
This adds scaffolding support for versions of Firebird < 3.0 (tested on 2.5) by eliding the
rdb$IDENTITY_TYPE
column if the version is too old - it uses the same logic as found in theFbColumns.cs
support elsewhere.This works well enough to create the raft of files representing each table, but it hasn't be tested for anything beyond that as Jiri has said other updates need to be done. So this is only an incremental step.