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
):...Is it recommended to create a SQL transaction every time we try to create a foreign relationship?

Doesn't drizzle-kit generate:pg work yet when schema imports from esm package?
drizzle-kit generate:pg --out src/db/migrations --schema src/db/schemasdrizzle-kit: v0.17.0 drizzle-orm: v0.23.1...
Is there `.returning()` in insert statement in MySQL like SQLite?
.returning()
insert statement in SQLite but MySQL not.
how do I .returning()
in insert statement in MySQL?...Can you please release this commit?
planetscale driver
...
Getting results in document form rather than record
{id: 1, user: "joe", posts: [{id : 1, title: "my first post"},{id : 2, title: "my second post"}]}
rather than in record form [{id: 1, user: "joe", post: {id : 1, title: "my first post"}}, ...}]
. I'm doing something like select({id ... post: {id: posts.id, title, posts.title}})
. Thanks.Unable to upgrade migrations if there are ones that do not change state but manipulate data
require() of ES Module is not supported planetscale serverless + sveltekit
MySQL Standalone queryBuilder?
Applying migrations with drizzle-orm/pg-core