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...Been getting this error while using the libsql client. The code works though. Any ideas. Thanks! 🙂

Select wildcard
.select()
wildcard so that I can do something like:
```ts
db.select((defaultFields) => ({...RangeError: Maximum call stack size exceeded - When I try to INSERT
RangeError: Maximum call stack size exceeded
when I try to INSERT something in the DB, SELECT queries works with no issues.
I am using "drizzle-orm": "^0.25.3"
and "@remix-run/react": "^1.15.0"
....Tables are not being generated

Inserting records into related tables
inArray
Invalid default value when using defaultNow()
Invalid default value for 'updated_at' (errno 1067) (sqlstate 42000) (CallerID: 2ga5bxx7mhtso265npy7): Sql: "alter table menus add UNIQUE INDEX menus_public_id_idx (public_id)", BindVars: {REDACTED}`
Invalid default value for 'updated_at' (errno 1067) (sqlstate 42000) (CallerID: 2ga5bxx7mhtso265npy7): Sql: "alter table menus add UNIQUE INDEX menus_public_id_idx (public_id)", BindVars: {REDACTED}`
Typesafe floats ?
numeric('weight', { precision: 10, scale: 2 })
...TS Errors in Custom Type citext example
PgColumnBuilder
:...
Does Drizzle support MySQL's LAST_INSERT_ID function?
returning
so it seems the alternative is a separate request in the same transaction that fetches the new record. It appears that the easiest way to do this is with MySQL's LAST_INSERT_ID
function. Does Drizzle support this or does this have to be done with raw SQL?Check for empty string in postgres
How do I set a column to be unique in drizzle syntax for mySQL?
Sharing zod schema between api and front-end
drizzle-zod
. My main concern was the "pollution" of the front-end bundle with back-end stuff. I wouldn't like people looking at my database schema or something unintendedHow to use JSON field in query