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 RevEng: Include computed columns #21588

Merged
merged 1 commit into from
Jul 16, 2020
Merged

SQLite RevEng: Include computed columns #21588

merged 1 commit into from
Jul 16, 2020

Conversation

bricelam
Copy link
Contributor

@bricelam bricelam commented Jul 10, 2020

Note, we can't get their actual SQL without parsing the entire CREATE TABLE statement, so we just generate HasComputedColumnSql without any arguments to at least make them usable.

Fixes #21557

@bricelam bricelam requested a review from a team July 10, 2020 20:24
@bricelam
Copy link
Contributor Author

Design meeting notes:

  • Make HasDefaultValue() throw in Migrations and EnsureCreated (breaking change)
  • Add HasDefaultValueSql() that behaves the same as HasDefaultValue()
  • Make HasDefaultValue(null) remove the DEFAULT constraint (breaking change)
  • Double-check that HasDefaultValueSql(null) removes the DEFAULT constraint
  • Add HasComputedColumnSql()
    • Throw in Migrations and EnsureCreated
    • HasComputedColumnSql("") should continue to throw
  • Handle HasDefaultValue(), HasDefaultValueSql(), and HasComputedColumnSql() in the model snapshot
  • Handle HasDefaultValueSql() and HasComputedColumnSql() in RevEng

@bricelam bricelam requested a review from dougbu as a code owner July 16, 2020 16:44
@bricelam bricelam changed the base branch from master to release/5.0-preview8 July 16, 2020 16:44
@bricelam bricelam requested a review from a team July 16, 2020 16:45
Note, we can't get their actual SQL without parsing the entire CREATE TABLE statement, so we just generate HasComputedColumnSql without any arguments to at least make them usable.

Fixes #21557
@bricelam bricelam merged commit a5f68d8 into dotnet:release/5.0-preview8 Jul 16, 2020
@bricelam bricelam deleted the recomputing branch July 16, 2020 17:26
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.

SQLite RevEng: Generated columns are missing
4 participants