column doesn’t exist

I'm getting the following error. It says the column doesn't exist but I did drizzle kit push and generate. Using the following scripts: "db:generate": "dotenv drizzle-kit generate:pg --config:drizzle.config.ts --schema=./src/server/db/schema.ts --out=./drizzle", "db:push": "dotenv drizzle-kit push:pg --config=drizzle.config.ts"
No description
2 Replies
Mykhailo
Mykhailo11mo ago
Hello @Franklin ! If you use drizzle-kit generate:pg, you need to run migrations after generation using the migrate function. You can find more information on migrations here: https://orm.drizzle.team/docs/migrations. Alternatively, drizzle-kit push:pg allows you to push your schema changes directly to the database without generating any migrations files, and it does not require their use. You have two options: 1) Declare your schema, generate and run migrations, and then execute your query. 2) Declare your schema, run drizzle-kit push:pg, and then execute your query. If I follow these steps, everything works for me. Write back if the problem persists, as it's not clear from the context what the issue might be.
Franklin
FranklinOP11mo ago
Thank you, i follow the docs and it is working as expected. Sometimes I have to read the docs lol
Want results from more Discord servers?
Add your server