Skip to content

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

@jasongerbes
Copy link

Related Drizzle ORM issues:

I believe this docs change also needs to be applied to the other dialects (MySQL, SQLite, and SingleStore), as the object syntax has been replaced by the array syntax for those too.

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
2 participants