Open LukasDeco opened 2 months ago
@LukasDeco I recently upgraded to 0.24.2
from 0.20.14
and ran into the same issue. It looks like the generate
command changed slightly and instead of running generate:pg
you have to specify postgres with the dialect flag.
So running:
drizzle-kit generate --dialect=postgresql --out=example/migrations/path --schema=example/schema/path
worked for me.
https://orm.drizzle.team/kit-docs/commands
I can't remember where the example you cited from the docs was exactly but I didn't see it on that page so perhaps the team has updated it.
@LukasDeco this should work with drizzle kit version ^0.24.2
npx drizzle-kit generate --config='./src/db/drizzle.config.ts
and your drizzle.config.ts
file can look like this
export default {
schema: './src/db/schema/', // this is a path to a folder where all schemas are located
out: './src/db/migrations',
dialect: 'postgresql'
}
thanks guys. We also got it working from using generate:pg
. I just want this issue to encourage the team to update the docs at least... maybe they did get updated?
This is the main example in the docs and it doesn't work: