PyEditorial icon indicating copy to clipboard operation
PyEditorial copied to clipboard

[Question] Why ignore migrations in version control?

Open GustavoCayres opened this issue 3 years ago • 1 comments
trafficstars

Hi, guys!

When setting up the project, I realized that the app's migrations are not being committed, and we're actually instructing running python manage.py makemigrations during setup.

Although it may seem irrelevant now to keep migrations in version control, after deploying a production database (or after multiple developers build their long lived databases), saving migrations will allow us to apply changes to our database without having to tear it down.

Was there a specific reason for .gitignoring migrations?

GustavoCayres avatar Apr 13 '22 01:04 GustavoCayres

Hello In projects, migrations files become commite when changes have been made in them, or the order of execution of migrations files is important, or the project is being developed as a team.

mavenium avatar Apr 18 '22 04:04 mavenium