DT
Drizzle Teamdjm30
How to insert into a table without providing values
I've got the following schema for users in sqlite, it only contains an id, which is an auto incrementing primary key.
I am trying to create a new record, that will auto generate the new id for me and return it.
This results in the following error:
I can pass in an ID to the value object and it will run and create a new record without error but that means I am generating the IDs, rather than the database and I'd like to avoid that.
Thanks
mr_pablo•354d ago
Try removing the empty object inside
values()
?
or try removing values()
altogether?The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.4KMembers
View on DiscordWant results from more Discord servers?
More PostsDoent infer type in Callback syntax for queryIm querying the users table like this
`db.query.user.findFirst({
where: (user, { eq }) => {
Bug When Trying To Increment A Fieldthis set the field to 0 instead of increasing by one it used to work in other routes
```
await Maximum call stack exceeded with relation to selfI have the following table
```
export const category = pgTable('categories', {
id: serial('id').importing into schema.ts fileHi,
I am using turborepo and I have defined my schema in `packages/schema/user.ts` and in my main AWhat versions of MySQL are supported? I have JSON_ARRAYAGG issues with 5.7 and AWS Aurora ServerlessCan you confirm what versions of MySQL you intend on supporting? Relational queries with joins use J`$with` example in docs error "unsupported: with expression in select statement"I have a user with id of 42, just like the docs https://orm.drizzle.team/docs/crud#with-clause
but