according to documentation, i should run `npx pris...
# orm-help
y
according to documentation, i should run
npx prisma dev
to create migration step which i think its procedure step is create migration -> apply migration -> npx prisma generate. what's the procedure difference between
npx prisma dev
and
npm prisma deploy
?
đź‘€ 1
a
Hey Yunbo! You’ve got the flow for
migrate dev
pretty much down, with the addition that the command will also try to detect drift between your schema and your database and might try to reset your database in an effort to reconcile the two. Because of this,
migrate dev
is not recommended for use in environments where data loss cannot be tolerated (like production).
migrate deploy
only applies the migrations it finds in your generated migration folder (and potentially warns if the migrations have been modified). It is ideally used in a production continuous integration pipeline and is typically not for local command-line use. This section in our docs does a pretty good job of outlining the differences. Let me know if I can clarify further!
y
Hi @Austin thanks for the update. I will look into it. It's not quite related but I've got this question. https://prisma.slack.com/archives/CA491RJH0/p1655864851453959?thread_ts=1655864851.453959&cid=CA491RJH0 If you could take a look, it would be appreciated!