Skip to content
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

SQLite Processor: Query column without loading whole table_info #1580

Merged
merged 2 commits into from Apr 15, 2022

Conversation

mattbrailsford
Copy link
Contributor

@mattbrailsford mattbrailsford commented Apr 12, 2022

This change performs an explicit column lookup with a single SQL statement to prevent the loading of the whole table_info into a DataSet as when used with Microsoft.Data.Sqlite this causes an exception when trying to load the dflt_value column.

Type of value has a mismatch with column typeCouldn't store <0> in dflt_value Column. Expected type is Byte[].

Related issue #1389 and #1570

This is based on example code on the MS docs https://docs.microsoft.com/en-us/dotnet/standard/data/sqlite/metadata#schema-metadata

This change performs an explicit column lookup with a single SQL statement to prevent the loading of the whole `table_info` into a DataSet as when used with `Microsoft.Data.Sqlite` this causes an exception when trying to load the `dflt_value` column.

    Type of value has a mismatch with column typeCouldn't store <0> in dflt_value Column. Expected type is Byte[].

Related issue fluentmigrator#1389 and fluentmigrator#1570
@mattbrailsford mattbrailsford changed the title Query column without loading whole table_info SQLite Processor: Query column without loading whole table_info Apr 12, 2022
@jzabroski jzabroski added this to the 4.0.0 milestone Apr 15, 2022
@jzabroski jzabroski merged commit 3ca4c1a into fluentmigrator:master Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants