Fixes for composite PK?

https://github.com/drizzle-team/drizzle-orm/issues/3383
Referencing this issue, using composite primary keys like the author here with errno: 1553 on subsequent pushes, took a look at the migration code that was generated and it seems like its not dropping the foreign key constraints and drop and recreating the primary key. Tried using pnpm patch to patch drizzle with the suggested fix here: https://github.com/drizzle-team/drizzle-orm/issues/1428#issuecomment-1916722940 but it did not fix the issue as I am using named primary keys. Cannot seem for the life of me get this to work. Do I have to manually create migrations and fix such issues or what is the proposed solution? Seems like using composite primary keys is one of the most used SQL features and donno why more people haven't ran into this issue. Would love to see if anybody has fixses for the issue?
GitHub
Here my schema: export const tableA = mysqlTable("tableA", { id: int("id").primaryKey(), }); export const tableB = mysqlTable("tableB", { id: int("id").prima...
GitHub
What version of drizzle-orm are you using? 0.28.6 What version of drizzle-kit are you using? 0.19.13 Describe the Bug Drizzle-kit isn't introspecting the correct primary keys from planet scale....
Was this page helpful?