Skip to content

The core differ silently drops SQL Server and Npgsql index options when it diffs a model a satellite should #92

Closed

Description

@CaffeinatedCoder

Problem

The core differ forwards no provider index options (IsForwardedIndexAnnotation is false for everything). When a SQL Server model is diffed by it instead of the satellite's, with UseComplexIndexes() instead of UseSqlServerComplexIndexes() at runtime, or when the satellite's .targets is not imported, every property-level option is dropped without a word:

CREATE INDEX [ix_prop_opts] ON [things] ([city]) WHERE "city" IS NOT NULL;
CREATE INDEX [cx_prop] ON [things] ([code]);

INCLUDE, FILLFACTOR, ONLINE, SORT_IN_TEMPDB, DATA_COMPRESSION and CLUSTERED are gone, and EnsureCreated() applies the result cleanly. The README tells consumers to use the satellite's method, so this is a misconfiguration, but its failure is silent. The same holds for Npgsql: options on a PostgreSQL model diffed by the core.

Fix

The core differ throws when a declaration carries a SqlServer: or Npgsql: index option it does not forward, naming the satellite registration to use. That changes a silent answer into an error, so it ships in a minor with a ### Changed answers row.

Found by the 5.5.0 pre-tag analysis (core and SQL Server).

Activity

  1. added this to the 5.6.0 milestone on Oct 19, 2026
  2. added
    bug
    silent
    severity/low
    package/core
    area/indexes
    on Oct 19, 2026
  3. modified the milestones: 5.6.0, 5.5.0 on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/indexesbugpackage/coreseverity/lowsilent

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions