Switching between single and composite primary keys

I have resolved this by nuking my database and all migrations then recreating, but I ran into this error when changing the nature of primary keys. It also wouldn't let me remove the table by way of migration.
TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')
at .../node_modules/drizzle-kit/bin.cjs:27627:67
TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')
at .../node_modules/drizzle-kit/bin.cjs:27627:67
consider this a bug report, not a cry for help.
3 Replies
grrowl
grrowl5mo ago
i'm getting this too, when adding a column to an existing compositePK (sorry gunna blow this up) the issue is bin.cjs:27640schema5 is '', not public as it should be (acoording to Object.keys(json1.tables) this fixes it, it looks like they just missed a spot in prepareDeleteCompositePrimaryKeyPg but is drizzle-kit not open source 🤯 i was gunna PR
MIDI
MIDIOP5mo ago
thanks for taking a look grrowl. I guess, and I say this without any negativity, that a little must be held back when VC funding is extended. Shame, I'm sure there are many like us who would be happy to contribute to drizzle-kit
grrowl
grrowl5mo ago
same, i had to patch it in node_modules but no chance to commit upstream well, my posts here were viewed so
Want results from more Discord servers?
Add your server