Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update doc about creating a migration (an empty migration to be more precise) #6181

Closed
kasir-barati opened this issue Aug 7, 2024 · 3 comments · Fixed by #6386
Closed

update doc about creating a migration (an empty migration to be more precise) #6181

kasir-barati opened this issue Aug 7, 2024 · 3 comments · Fixed by #6386
Labels
docs Documentation creation, updates or corrections

Comments

@kasir-barati
Copy link

kasir-barati commented Aug 7, 2024

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 dev to 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 kasir-barati added the docs Documentation creation, updates or corrections label Aug 7, 2024
@AdityaSrivastava185
Copy link

AdityaSrivastava185 commented Sep 22, 2024

@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 ?

@nikolasburk
Copy link
Member

Hey @kasir-barati, thanks a lot for raising this! Fully agree that the current phrasing was unclear and have created this PR: #6386

Does this make it more clear to you?

@kasir-barati
Copy link
Author

@AdityaSrivastava185 no just the wording. No functionality change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation creation, updates or corrections
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants