Yunbo
06/20/2022, 7:25 PMnpx 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
?Austin
06/21/2022, 9:11 PMmigrate 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!Yunbo
06/22/2022, 1:28 PM