1 Reply
Hello, @sizzF. Could you tell us more about your problem and steps that you did?
I followed these steps and everything worked for me
1. Declared the same
drizzle.config.ts
as you
"drizzle.config.ts"
2. Declared schema in src/db
folder
"src/db/schema.ts"
3. Then I ran npx drizzle-kit push:db
to apply changes directly to the database, so the users
table was created. (Also, you can skip this step and just generate migrations, but then you have to run migrations to apply changes to the database)
4. Then I ran the npx drizzle-kit generate:pg
command, and it generated a migration file with snapshots, which we can find in the drizzle
folder in your project's root directory.
This is our migration file