You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified that the bug I'm about to report hasn't been filed before.
What version of drizzle-orm are you using?
0..38.4
What version of drizzle-kit are you using?
0.30.2
Other packages
No response
Describe the Bug
Undesired Behavior
As per this documentation the limit for the length of an identifier in Postgres is 63 bytes. Anything larger is truncated by default. This is causing unexpected bugs in the DB.
I have a table that references another table . And the autogenerated identifier is longer than 63 bytes. This was the created SQL:
ALTERTABLE"myschema"."roles_myproject_gpt_assistants" ADD CONSTRAINT"roles_myproject_gpt_assistants_assistant_id_myproject_gpt_assistants_id_fk"FOREIGN KEY ("assistant_id") REFERENCES"myschema"."myproject_gpt_assistants"("id") ON DELETE no action ONUPDATE no action;
This identifier is greater than 63 bytes and the rest of the identifier is truncated and is causing multiple identifiers to have the same name.
Steps to reproduce
Create a sample db having two tables with long names and long column names.
Drizzle shouldn't auto generated an identifier longer than 63 bytes without warning. Or add a random string (say asX4ft_) in front of the identifier by default if the name is not provided explicitly.
The text was updated successfully, but these errors were encountered:
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0..38.4
What version of
drizzle-kit
are you using?0.30.2
Other packages
No response
Describe the Bug
Undesired Behavior
As per this documentation the limit for the length of an identifier in Postgres is 63 bytes. Anything larger is truncated by default. This is causing unexpected bugs in the DB.
I have a table that references another table . And the autogenerated identifier is longer than 63 bytes. This was the created SQL:
This identifier is greater than 63 bytes and the rest of the identifier is truncated and is causing multiple identifiers to have the same name.
Steps to reproduce
Environment I am on
PostgreSQL: 16
Driver: [email protected]
Runtime: [email protected]
Expected Behavior
Drizzle shouldn't auto generated an identifier longer than 63 bytes without warning. Or add a random string (say
asX4ft_
) in front of the identifier by default if the name is not provided explicitly.The text was updated successfully, but these errors were encountered: