is there a way to use prisma to create and deploy ...
# prisma-migrate
j
is there a way to use prisma to create and deploy data migrations? i.e., migrations that don’t alter tables or columns, and just insert or update rows
s
You can create a blank migration.sql file with:
Copy code
npx prisma migrate dev --create-only
…then write your own insert/update statements in there
j
So not really yet @John Peña
But you can certainly use
migrate deploy
to execute migrations that do that
j
i think the approach that @sven mentioned would work well
👍 1
j
Perfect, if you can think of a better one though, make sure to create an issue for us. Some day we will want to do more there.
🚀 2
a
This works as long as using SQL is deemed acceptable. We also have a feature request open for a Typescript migration DSL that would make data migrations easier: https://github.com/prisma/prisma/issues/4688 For other solutions, creating a new issue would be best, as Jan said!