Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update indexes-constraints page pgTable to the correct signature #453

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hill
Copy link

@hill hill commented Dec 10, 2024

#433 updated these docs to the new signature in 0.36.0, where

...
  (table) => ({
    constraint: unique().on(table.something)
  })
)

becomes:

...,
  (table) => [
    unique().on(table.something)
  ]
)

but it left the PgTableExtraConfig in the array, which is incorrect and results in drizzle-kit not generating migrations. (i.e was updated to:

...,
  (table) => [{
    constraint: unique().on(table.something)
  }]
)

)

As per the mentioned diff, I believe it should be PgTableExtraConfigValue[] not PgTableExtraConfig[]

Let me know if I've misunderstood this and thanks for your time 🤗

Closes #456

@hill
Copy link
Author

hill commented Dec 11, 2024

I believe this PR also closes #456

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.

Incorrect Example for Defining Composite Primary Keys
1 participant