drizzle-team / drizzle-team/drizzle-orm
[FEATURE]:PgColumnBuilder.references to accept foreignKeyName
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
### Describe the enhancement you want to request
Would love to see an option where you can specify the FK name, e.g. something like this:
```
grantedBy: uuid("granted_by").references(() => User.identifier, {
foreignKeyName: "func_perms_of_group_granted_by_fkey",
onDelete: "cascade"
}).notNull(),
```
With this enhancement, you can stay in the "fluent" writing style and still deal with overly long constraint names.
(I think this applies to other constraints, too, but did not check because it did not hurt me yet)
Contributor guide
Assessment
This issue has not been assessed yet.