Skip to content

Instantly share code, notes, and snippets.

@nelsonsequiera
Created February 22, 2019 09:21
Show Gist options
  • Save nelsonsequiera/e2b2f2411d7bb895e50e5fe2a40be4f4 to your computer and use it in GitHub Desktop.
Save nelsonsequiera/e2b2f2411d7bb895e50e5fe2a40be4f4 to your computer and use it in GitHub Desktop.

whenever you do changes to database models in Django:

  • run python manage.py makemigrations
  • run python manage.py migrate
  • add the newly created migration file to git.
    • git add <migration_file_name>. You will find this file in migrations directory of your app.
    • git add <models.py file>.
  • commit the file to git.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment