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

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"


So if my build runs without issues, it will apply the migrations to my production DB.


Is this correct?
Was this page helpful?