update doc about creating a migration (an empty migration to be more precise)
Hey guys,
I was wandering around the doc to find out how can I create an empty migration and then I ended up herje under options section I read that it says:
Creates a new migration based on the changes in the schema but does not apply that migration. Run
migrate devto apply migration.
For --create-only flag. So I though I cannot use it for creating an empty migration file. Then I read this Stackoverflow Q&A and tried it. Surprisingly they were right about it; you can create an empty migration without the need to have anything changed in schema.prisma.
Thus I think it is time to revise it to be more accurate. Maybe something like this would do the trick: "Creates a new migration based on the changes in the schema, or just creating an empty one when your schema has not change. Note that this does not apply that migration automatically. Run migrate dev to apply migration."
Any comment/idea/feedback?
Best of luck.
@kasir-barati After making changes in the databse or prisma schema , user has to run the command npx run dev to update the prisma schema everytime to keep the database in sync with the model , Do you want that to update in the migration section ?
Hey @kasir-barati, thanks a lot for raising this! Fully agree that the current phrasing was unclear and have created this PR: https://github.com/prisma/docs/pull/6386
Does this make it more clear to you?
@AdityaSrivastava185 no just the wording. No functionality change.