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 this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
(This may be SQLite specific)
Right now the index method from drizzle-orm/sqlite-core requires a name for index:
(t)=>[index().on(t.code,t.name)]// => Expected 1 arguments, but got 0.
I've been using my own helper method (wrapper around index and uniqueIndex) to automatically assign it a unique index name such as index_users_code_name, but I've been needing the helper in all of my projects.
I believe ORM should offer a sane and safe default that covers 90% of use cases.
That way, users are only expected to give it a name when they feel they absolutely need it, like when >62 chars.
Feature hasn't been suggested before.
Describe the enhancement you want to request
(This may be SQLite specific)
Right now the
index
method fromdrizzle-orm/sqlite-core
requires a name for index:I've been using my own helper method (wrapper around
index
anduniqueIndex
) to automatically assign it a unique index name such asindex_users_code_name
, but I've been needing the helper in all of my projects.I believe ORM should offer a sane and safe default that covers 90% of use cases.
That way, users are only expected to give it a name when they feel they absolutely need it, like when >62 chars.
https://blog.saeloun.com/2023/10/24/rails-index-name-too-long/
The text was updated successfully, but these errors were encountered: