I copied template from https://orm.drizzle.team/docs/migrations and modified to work with SQLite adapter that we have.
If you run the npm run db:migrate you will get a missing journal error. And this is due to the lack of actual migrations. You need to run npm run db:generate first.
I didn't run it and didn't include migrations into the template because user might want to change tables prefix. If tables prefix changes then user will have to regenerate all migrations.
Generally speaking I would change README.md to use migrations approach instead of db:push. It's anti-pattern to db:push directly into production database. You never know how does the final push migration looks like.
I copied template from https://orm.drizzle.team/docs/migrations and modified to work with SQLite adapter that we have. If you run the
npm run db:migrate
you will get a missing journal error. And this is due to the lack of actual migrations. You need to runnpm run db:generate
first.I didn't run it and didn't include migrations into the template because user might want to change tables prefix. If tables prefix changes then user will have to regenerate all migrations.
Generally speaking I would change README.md to use migrations approach instead of
db:push
. It's anti-pattern todb:push
directly into production database. You never know how does the final push migration looks like.