Closed rizen closed 3 months ago
You can specify foreign key names in drizzle now using the foreignKey()
function. https://orm.drizzle.team/docs/indexes-constraints#foreign-key
Just have to figure out how to use that with references()
for cascades.
now generating our own key names
It concatenates the primary table name with the the field name and then with the destination table and then added _id_fk to it.
So we need a way to generate shorter key names, or warn when they are too long.
Max length is 64 characters