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

Fix to #26676 - EF Core 6 - IsTemporal adds an unnecessary migration when DefaultSchema is configured at the DbContext Level #27198

Merged
merged 1 commit into from
Jan 21, 2022

Commits on Jan 21, 2022

  1. Fix to #26676 - EF Core 6 - IsTemporal adds an unnecessary migration …

    …when DefaultSchema is configured at the DbContext Level
    
    Problem was a discrepancy between RelationalModel build in runtime and the current model (from OnModelCreating) - relational model would set history table schema annotation using the table schema or default schema, however current model wouldn't set those annotations.
    Model differ would then pick up on those differences and create migration to set the schema for history table. When building actual migration sql we already compensated for the difference and not generate actual sql code, but the problem persists.
    
    Fix is to add missing default annotations in the model finalization step. This is a temporary measure until we implement default value conventions (#9329)
    
    Fixes #26676
    maumar committed Jan 21, 2022
    Configuration menu
    Copy the full SHA
    cf46ae0 View commit details
    Browse the repository at this point in the history