#!/bin/sh #remove migrations files find .. -path "*/migrations/*.py" -not -name "__init__.py" -delete find .. -path "*/migrations/*.pyc" -delete #delete records from migrations table psql -d -c 'delete from django_migrations;' #create migrations again python manage.py makemigrations #Using Django 1.11 > update_contenttypes no longer exists python manage.py migrate --fake contenttypes #simulates table creation python manage.py migrate --fake-initial