plainblack / ving

An opinionated web services starter for Nuxt3 that provides REST and per-field privileges out of the box.
https://plainblack.github.io/ving/
58 stars 7 forks source link

key names in drizzle migrations can get really long #72

Closed rizen closed 3 months ago

rizen commented 3 months ago

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

rizen commented 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.

rizen commented 3 months ago

now generating our own key names