-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
MigrationsSqlGenerator: DefaultValue formats default value properly #16909
Conversation
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.
LGTM. We should try and take this for 3.0 since it's consistent with the column type flowing we've added to the query pipeline in 3.0.
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.
Looks good other than my one comment.
Thanks for the feedback. I've incorporated your suggestion and also changed the call to
This solves the issue for SQLite provider, where this test had failed:
It tried to generate SQL literal for TEXT from DateTime and failed because of cast from DateTime to string (I guess this is necessary (for SQLite), because SQLite lacks proper date time type, right?). |
@bricelam I've rebased branch onto release/3.0 and now lots of tests in SqlServer.FunctionalTests fail (e.g. Did I do something wrong, or is it something else? |
Almost certainly unrelated. (Re-running the CI) |
You’re good. I’m just slow. I’ll get it into the 3.0.0 release. |
…pe of the column, for which the default value should be generated.
Fix for issue #14457. Contains breaking change in MigrationsSqlGenerator (changed signature of DefaultValue method).