drizzle-team / drizzle-team/drizzle-orm
[DOCS]: @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Enhancement hasn't been filed before.
- [x] I have verified this enhancement I'm about to request hasn't been suggested before.
### Describe the enhancement you want to request
The code has this block:
https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/table.ts#L89C3-L110C5
```ts
/**
* @deprecated The third parameter of sqliteTable is changing and will only accept an array instead of an object
*
* @example
* Deprecated version:
* ```ts
* export const users = sqliteTable("users", {
* id: int(),
* }, (t) => ({
* idx: index('custom_name').on(t.id)
* }));
* ```
*
* New API:
* ```ts
* export const users = sqliteTable("users", {
* id: int(),
* }, (t) => [
* index('custom_name').on(t.id)
* ]);
* ```
*/
```
but it's unclear how to migrate. The example code before/after seems unclear. The "before" code has an object with an `idx` prop, and the "after" has an array with no `idx` prop anywhere. I'm not sure what `idx` is or where it is in the second example, whether it's inferred or what (or how).
I can't find dedicated docs for `sqliteTable`:
Contributor guide
Assessment
This issue has not been assessed yet.