No schema changes, nothing to migrate đ´
I'm trying to run a very basic setup and drizzle-kit doesn't pick up on the schema. I've been... fighting this for a bit. Basically out of ideas.
I run the command
npx drizzle-kit generate --dialect=postgresql --schema=./db/schema.ts
I get the output:
Not sure what I should be doing different. I've also tried this with config files, with files in the root, but I keep getting the same thing.
5 Replies
Bump? I'm gonna give this another try tomorrow but will probably move away from drizzle if it doesn't work. I have two other projects that use drizzle and very happy with it, but something happened now (possibly my mistake?) and it just doesn't work.
Are you by any chance using bun for this one project? I had the same issue months ago using bun only. Not sure if it is fixed by now. Maybe it is not and you are running into it now too
Oh
Just saw you are using npx
Nevermind then, sorry
Maybe I should be using bun đ
You're declaring your schema using SQLite tables and data types but you seem to have PG set as the dialect and pg as the driver. So, are you using Postgres or SQLite?
If you're using Postgres, change the imports from
sqlite-core
to pg-core
.
If you're using SQLite, set SQLite as the dialect either in your drizzle.config.ts file or in the corresponding commands, and remove pg
from your dependencies and install a SQLite driver insteadOh man... I wish I had opened this sooner đ
this was exactly it! I just picked up debugging this today and realized my mistake and came here to reply in case anyone else read. But you beat me to it by 6 days. Thanks a lot for giving it your time! đ