MySQL unique constraint
Error querying planetscale db
db push connection error
Select exists
Custom SQL function (json_agg & json_build_object)
jsonAgg
helper....Error migrating after updating to orm 0.23.3
workflow best practices with planetscale
db push
however drizzle kit has migrations and a beta push
as well, what would be the best move here?
Of course trying to avoid destructive changes when pushing or updating the db schema...Invalid default value for timestamp

drizzle-orm/mysql-core has no InferModel or MySqlRawQueryResult exports
drizzle-orm/mysql-core
should have the exports InferModel
and MySqlRawQueryResult
, but whenever I try to import them in my project, I get the error Module '"drizzle-orm/mysql-core"' has no exported member 'InferModel'
. I'm using drizzle-orm
version 0.23.2
, so it'd be awesome if someone could clarify whether this is a known issue, or what's happening here exactly.SQLite migrations are not being applied
drizzle-kit generate:sqlite
. I have a db file in my root and folder with the migration that creates a users
table.
I get an error when I try query the users
table, saying it does not exist....Question: Wouldnt it make sense for value to be automatically notNull if you set a default
Code generated value
Randomly stopped being able to generate migrations (MySQL)
migrations
folder, attempted to re-generate migrations, and was met with 0 tables
🤣
I've killed-off all of my schema, except for one simple table, and ran generate:mysql
with DEBUG
;
```bash...BUG: Postgres migration script generates a few syntax errors
node-postgres
, and kept getting a lot of errors.
I had to make the following changes to the SQL script:
1. Add double quotes around table, index, and other field names
2. Array fields with default values just never generated the right code. So I had to manually add the default value in. ...
uuid's being inferred as strings
Any easy way to create a typescript ENUM type from pgEnum?
Plans to add array related support for Postgres?

Migrating from Prisma
Cannot read properties of undefined (reading '0')
get()
when there would be no matching results for a given select query? Does it return null
or would this be an error? At present it's giving an error. I'm new to discord, but I guess I expected it to return a null
. For example, the following query works and returns an empty array:
db.select().from(users).where(eq(users.email, email)).all();
db.select().from(users).where(eq(users.email, email)).all();
all()
to get()
results in error trying to access first element of an empty array (drizzle-orm/utils.js:40:37
):...