Skip to content

Fix #638 and #639: treat single column unique indexes as primary key#640

Open
hhowe29 wants to merge 2 commits intosequelize:masterfrom
hhowe29:treat_unique_index_as_primary_key
Open

Fix #638 and #639: treat single column unique indexes as primary key#640
hhowe29 wants to merge 2 commits intosequelize:masterfrom
hhowe29:treat_unique_index_as_primary_key

Conversation

@hhowe29
Copy link

@hhowe29 hhowe29 commented Mar 11, 2023

  1. Treat single column unique indexes as a primary key if no other primary key was found.
  2. Make assertion errors in build.test fail the test if they occur.

Fixes #638 and implement #639.

…t single column unique indexes as a primary key if no other primary key was found. Fixes sequelize#638 and implement sequelize#639.
@ephys
Copy link
Member

ephys commented Mar 11, 2023

I don't think we should do #639. I understand that you have legacy tables but unique columns are not primary keys and we should not mark them as such in their corresponding models

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build.test can never be red

2 participants