Skip to content

Instantly share code, notes, and snippets.

View mhsamiei's full-sized avatar

mohammad hossein mhsamiei

  • Iran
View GitHub Profile
@mhsamiei
mhsamiei / merge_migration.md
Created August 2, 2020 06:50 — forked from mhipo1364/merge_migration.md
Re-Generate(Merge) Migration Files In Django

Re-Generate Migration

To merge exist migration files into one file:

  • Remove django_migration records table (manually)
  • Remove all migration files
  • run python manage.py migrate --fake command
  • run python manage.py makemigrations command
  • run python manage.py migrate --fake-initial command
  • run python manage.py migrate contenttypes command