skuse
skuse
Explore posts from servers
DTDrizzle Team
Created by skuse on 4/20/2024 in #help
NaN primary keys + not honouring camelCase table names
Hey thanks zeus I got it working
4 replies
DTDrizzle Team
Created by LeFuncq on 11/29/2023 in #help
TypeError: Cannot read properties of undefined (reading 'type') on drizzle kit push command
TLDR This bug happens when you change your primary key. To fix you need to re add the name of the field you deleted to your table, but not as serial or primary key. Once you push your changes you can delete the old field and push again.
6 replies
DTDrizzle Team
Created by LeFuncq on 11/29/2023 in #help
TypeError: Cannot read properties of undefined (reading 'type') on drizzle kit push command
I get this error using planetscale DB and changing the primary key. Fixed by incrementally pushing: 1. add the ID field back to the table, push, should be successful 2. change the type of the ID field to varchar / something other than serial or primaryKey. Add the new primary key field, in my case its a compound key. Push 3. Delete the ID field and push again seems to be a bug with changing the primary key. Some kind of name conflict
6 replies
DTDrizzle Team
Created by skuse on 8/8/2023 in #help
Cant drop key mysql
this is for dropping unique constraint. I havent tested it with other keys
3 replies
DTDrizzle Team
Created by skuse on 8/8/2023 in #help
Cant drop key mysql
the code it attempts to execute is:
'ALTER TABLE `Attribute` DROP CONSTRAINT `Attribute_tokenAttributeId_key`;'
'ALTER TABLE `Attribute` DROP CONSTRAINT `Attribute_tokenAttributeId_key`;'
whereas it should be:
ALTER TABLE `Attribute` DROP INDEX `Attribute_tokenAttributeId_key`;
ALTER TABLE `Attribute` DROP INDEX `Attribute_tokenAttributeId_key`;
3 replies
DTDrizzle Team
Created by skuse on 8/3/2023 in #help
Dropping unique constraint cant push to db
(planetscale)
2 replies