ReactionMechanismGenerator / RMG-website

A Django-powered website for Reaction Mechanism Generator (RMG)
Other
20 stars 29 forks source link

Clean migration files #231

Closed xiaoruiDong closed 2 years ago

xiaoruiDong commented 3 years ago

This PR is intended to clean up the migration files. A commit previously added potentially changes the migration history and causes migration issues in the production site. That single commit is reverted and new migration files are added (automatically generated by the script).

Just as a record, let me write down my understanding of the migration.

  1. Most commonly, only need to run makemigrations when functions in models.py are changed.
  2. Migration files generated by makemigrations need to be committed. If makemigrations fails, there might be some migrations files previously created in the development that cause conflicts (If run git status, you may find those files unstaged). Remove those files and try again.
  3. Only run makemigrations in the development environment rather than the production environment. (So I commented out the makemigrations line in the script we used @jonwzheng)

I don't know if all my understanding is correct, so feel free to make comments on that.