Identifier is too long (should not exceed 63 characters)
Hello guys. I've got too long constraint id generated by drizzle kit in migration files. Is it safe to apply such migration? Maybe there is a way how I can set custom constraint id for some tables? Here is my schema
Here is the generated sql
7 Replies
Forgot to mention I'm using RDS Aurora for postgres
@Dan Kochetov can you help, please?
passing to @Andrew Sherman
@Andrew Sherman, please, help)
you found me
it won't work now if you are using drizzle-kit for migration management. We will add a new API in drizzle-orm to provide custom names for fk and pk. After that evertyhing will work as expected
I'll try to make a high priority for this task
I know it's blocking some other devs already
For now, you can just go into a migration file and replace or remove the parts. I know, this isn't pretty, but it does work. Just note that for every migration drizzle kit will try to rename it, so you have to delete the ALTER queries. Maybe just create a file or a note that includes the names of the keys so you can search and replace quickly. Or, if you have to much time to automate a task that you could do in a few seconds manually, write a short script that does it automatically
thank you guys so much for help!