Fix/dbml commented refs duplicate indexes #31

Merged
warkanum merged 3 commits from fix/dbml-commented-refs-duplicate-indexes into master 2026-09-23 16:48:55 +00:00
Owner
No description provided.
warkanum added 3 commits 2026-09-23 16:48:48 +00:00
PostgreSQL index names share the schema-wide relation namespace, so a
reused name makes CREATE INDEX IF NOT EXISTS silently skip the duplicate.
Add duplicate_index_name rule (enforce by default) covering indexes and
PK/unique constraint backing indexes.
Commented refs are collected per file and resolved against the combined
model after all inputs are loaded (directory, --from-list, merge, jobs).
Matched refs become FKs and relationships; duplicates of existing FKs are
skipped; missing targets are skipped with a warning; column type
mismatches warn.

Also keep reused index names within a DBML table instead of overwriting,
give a second FK to the same table a distinct relationship name, and make
the pgsql writer match relationships to FKs by name first.
warkanum merged commit 99fc4b0944 into master 2026-09-23 16:48:55 +00:00
warkanum deleted branch fix/dbml-commented-refs-duplicate-indexes 2026-09-23 16:48:55 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wdevs/relspecgo#31