How do you deal with migrations? on postbuild?

So, usually while developing locally, whenever I change my schema I run:
drizzle-kit generate:sqlite
// and then
node ./server/db/migrate.js
drizzle-kit generate:sqlite
// and then
node ./server/db/migrate.js
This first generates the migrations and then applies them to my local db. Once I deploy in my package.json postbuild script I have:
postbuild:"node ./server/db/migrate.js"
postbuild:"node ./server/db/migrate.js"
So if my build runs without issues, it will apply the migrations to my production DB. Is this correct?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server