Skip to content

A 5.x annotation that no reader reads is passed over in silence #93

Closed

Description

@CaffeinatedCoder

Found while writing the 5.x reader for exclusion constraints (#92).

Problem

The planner reads its own annotations and, since #92, an earlier package's annotation that has a registered reader. Every other annotation of EFCore.ComplexIndexes 5.x in a model snapshot is passed over without a word: CustomIndex:* on an entity type (expression and JSON-member indexes, typed filters) and the temporal constraints and foreign keys of CustomTemporal:*.

A project that moves before those readers exist (#27, #18, #29) gets a first migration that looks right and is not:

  • An index 5.x built is not in the source side of the diff. Declared again with SchemaKit it is created a second time, which fails at apply on the name, or under a new default name silently leaves the old one in place beside it.
  • An object the consumer removes from the model is never dropped.

Neither is an error at migrations add. That is the failure this package exists to prevent.

Change

The source side of a diff refuses an entity type or model that carries an annotation of a known earlier format for which no reader is registered, naming the annotation and the package version that reads it. The list of names is 5.x's and is finished; CustomTemporal:SuppressAutoExtension, which the PostgreSQL package reads, and CustomIndex:RenderingVersion are on it as read.

A reader then removes its annotation from the list by being registered, so the guard needs no edit when #27 and the temporal handover land.

Done when

Activity

  1. added this to the 11.0.0 milestone on Nov 12, 2026
  2. added
    enhancement
    silent
    package/core
    area/migrations
    on Nov 12, 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/migrationsenhancementpackage/coresilent

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions