Skip to content

sys-metadata's declared overlay index shape diverges from the migration-owned partial form — every composed migrate plan proposes a recreate_index that would break draft/active coexistence #13203

Description

@hotlong

From cloud#1736's audit (control-plane drift): the framework's overlay-index migration owns idx_sys_metadata_overlay_active and installs a PARTIAL, NULL-safe form (WHERE state='active', COALESCE(package_id,'')), but sys-metadata.object.ts DECLARES a plain index under the same name. Consequences: (1) os migrate plan proposes recreate_index [destructive] on every run against a DB carrying the migration's form; (2) if anyone ever applies it, the plain form collides draft with active and leaves package-less overlays unconstrained — and because syncDeclaredIndexes skips by NAME, the framework migration would never repair it. Deliverable: make the DECLARED shape carry the partial/NULL-safe form (or teach the declaration vocabulary to express it), so the plan stops proposing the wrong index. Consumer evidence: cloud#1736 table, findings on sys_metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions