Been getting this error while using the libsql client. The code works though. Any ideas. Thanks! 🙂
I get the error from the screenshot every time I access my db client, but the code works fine though. How can I get rid of the error? 🙂

Select wildcard
I'm sure someone's asked this before but I can't find it.
Is there not a way to do a
.select()
wildcard so that I can do something like:
```ts
db.select((defaultFields) => ({...RangeError: Maximum call stack size exceeded - When I try to INSERT
Hi,
I am getting
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
Hey 👋
I'm probably missing something obvious but with the setup I have (shown in the image) drizzle doesnt seem to apply the things inside the migration folder.
It does generate the drizzle schema in the db + the __drizzle_migrations table so something is running for sure, but it doesnt seem to pick up on the migrations I did.
Appreciate the help!...

Inserting records into related tables
I have a few of tables that are related. I just need to know if there's a better approach when inserting records into these. I'm using PlanetScale so no FK constraints. Here's my approach.
```
export const product = mysqlTable('product', {
id: serial('id').primaryKey(),...
inArray
For what i've seen pass an empty array to inArray is not supported, how to you handle this cases? using "with" queries and adding it conditonally? or how?
Invalid default value when using defaultNow()
Receiving error:
...
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 ?
I'm trying to create a column called "weight". It needs to have values like "33.33" as floats.
I'm using PostgreSQL - and I've created a column with the following settings;
numeric('weight', { precision: 10, scale: 2 })
...TS Errors in Custom Type citext example
I want to include citext data type in my postgres schemas. I was delighted to see there's a complete example in the docs (https://github.com/drizzle-team/drizzle-orm/blob/main/docs/custom-types.md#citext-data-type-example)
However, it seems to be broken - see screenshot - because I'm getting a bunch of TS errors. Something on my side or is it outdated?
Edit: to give a bit more context, the errors all seem to be originating, for now at least, from this error on
PgColumnBuilder
:...
Does Drizzle support MySQL's LAST_INSERT_ID function?
I'm wanting to return a newly created record in the db immediately after a POST. MySQL doesn't support
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
Hi. First post. 🙂 Started looking into migrating our project to drizzle today and am loving it so far.
I want to add a not-empty check and from what I gathered from the docs and this example https://github.com/drizzle-team/drizzle-orm/blob/b003e523c637c81e2c522003db03d3d9bd98b723/drizzle-orm/type-tests/pg/tables.ts#L76 (which is the only one I could find) this code should work:
```ts...
How do I set a column to be unique in drizzle syntax for mySQL?
Would something like this be correct?
```js
export const authUsers = mysqlTable(
'auth_users',...
How to use JSON field in query
I've already made an issue on GitHub kind of pertaining to this issue, but I don't know if its actually a bug or if I'm just not using it correctly.
Reference:
https://github.com/drizzle-team/drizzle-orm/issues/463
...
MySQL, PG proxy driver
@Andrii Sherman
Hi, Andrew!
I noticed that the April milestone for drizzle-orm includes MySQL and PG proxy drivers. I was just wondering if these features are still expected to be released within this month.
...
How to create tables?
So my understanding is that running a "migration" means creating the table with the schema in your db.
My understanding is the code below should do it as per the docs. I've also separately run
My understanding is the code below should do it as per the docs. I've also separately run
npx drizzle-kit generate:pg
beforehand to generate my schema.
```js
// db.ts
const pool = new Pool({...onUpdateNow usage
is onUpdateNow simlar to prisma's @updatedAt ? I.e., updated_at col is auto-updated. If so, is there an example usage? Thanks!
ERR_PACKAGE_PATH_NOT_EXPORTED on 0.25.1
Just updated for the new ESM support, and noticed I can no longer generate migrations (See image)
I've updated all my import paths to take advantage of ESM, and the schema works fine outside of kit (i.e. just using it in my monorepo normally)...

UPSERT many ?
I have a table called
crmCompanies
containing companies from my client's CRMs.
Each day, I receive an array with all of the companies of my client. The thing is: I need to insert a new company in crmCompanies
if it doesn't exist otherwise, update all its values.
Here's the syntax from the docs (https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/README.md#upsert-insert-with-on-conflict-statement);...missing type declarations in mysql-core imports (>v0.25.1)
after upgrading drizzle-orm to v0.25.1 i get some errors in my schema telling me that
drizzle-orm/mysql-core/indexes
, columns
and table
all have missing type declarations, any idea why that might be happening?[email protected] broke edge support
Seems like the ESM Support broke some stuff in the edge runtime land. This my vercel build output with [email protected]:
