use constant in between operator
Type error: Could not find a declaration file for module 'drizzle-kit'.
Typescript error that doesn't make a whole lot of sense when calling db.select or db.insert
Are default values not transferred over via drizzle-zod?
default([])
in my schema
file that when I create a Zod object, I have to re-do the defaults?Replace on Insert
.ignore()
option added to insert, but is there an equivalent .replace()
or someway to flag it in the code?
I'm doing an insert many by passing through an array of values (e.g. await db.insert(ActivityTable).values(values);
) which is effectively an over write of existing data as well as new data...Is there a way to modify the select() on an existing query ?
const query = db.select().from(myTable)
const query = db.select().from(myTable)
The inferred type of '<tableName>' cannot be named without a reference to '.pnpm/[email protected]
drizzle-zod
but I keep getting this error...
Any idea on where it comes from ?
Thank you !...Migration failure on fresh DB
Using Vercel Postgres and developing locally
drizzle
(and other platform specific stuff like sql
) from drizzle-orm/vercel-postgres
or drizzle-orm/node-postgres
based on NODE_ENV
?
I see the sample Next.js project has been updated for Vercel Postgres: https://github.com/vercel/examples/blob/main/storage/postgres-drizzle/lib/drizzle.ts...Custom Type interpreted as String
Can I use queryBuilder for inserts?
queryBuilder
(https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/README.md#query-builder) since I wouldn't need to connect to a DB to generate the SQL queries, but seems like queryBuilder
only supports select()
at the moment. Do I need to connect to a local DB if I want to generate insert()
queries?I ran introspect:pg to initialize my schema, then created a new migration. How should I deploy this?
drizzle.__drizzle_migrations
table. It'd be nice to have a way to know that the old migrations - the ones that were generated by introspect:pg and just reflect the existing state of the database - won't run. Is this the right way to look at it? Thanks!Transaction rollback
error creating relationship
npx drizzle-kit push:mysql
but the I'm trying running the code inside my MySQL database but I'm getting this error
Referencing column 'user_id' and referenced column 'id' in foreign key constraint 'anime_user_id_users_id_fk' are incompatible.
here is the schema and the generated SQL migration code.
```javascript
export const users = mysqlTable(
"users",...define default value for array
TS query types dont match + no return types
const data = await db.select().from(Item)
As you can see in the screenshot and the error message below typescript seems to have trouble with that. Item
table definition is being imported from another typescript project within the repo which might have to do with it?
...Can't generate migrations because of top level await
drizzle.config.json
:```{ "out": "./migrations", "schema": "./src/*/.sql.ts" }...
Error types with custom schema
Trying to write next-auth adapter
nothing to migrate
and, when I run tests against my db.sqlite
, I get back errors for no tables, kiddo
. Pretty confused; seems like I'm not pushing any schema somehow?
Pull request if you want to look at code: https://github.com/nextauthjs/next-auth/pull/7165...