Skip to content

Index and constraint names are not checked against table, view and sequence names in the schema #82

Closed

Description

@CaffeinatedCoder

Problem

ValidateNamesAcrossKinds and the schema-scoped index-name check collect indexes and constraints only. PostgreSQL's relation namespace also holds tables, views and sequences, so

b.HasComplexIndex(x => x.Code, indexName: "codes");   // on table "rows", while a table "codes" exists

scaffolds cleanly and fails at apply with 42P07 relation "codes" already exists.

Fix

Add the model's tables, views and sequences of the schema to the relation-namespace check. Loud. Found by the 5.5.0 pre-tag analysis.

Activity

  1. added this to the 5.5.1 milestone on Oct 19, 2026
  2. added
    bug
    severity/low
    package/postgresql
    area/indexes
    area/constraints
    on Oct 19, 2026
  3. modified the milestones: 5.5.1, 5.5.0 on Oct 20, 2026
  4. added a commit that references this issue 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/constraintsarea/indexesbugpackage/postgresqlseverity/low

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions