Search code examples
pythondjangomigrationdjango-south

Updating django application, migrations


Is it possible to remove schemamigrations from the Queue? For example. When I run the command ./manage.py migrate --list, it returns a list of all migrations including items that have yet to be migrated.

I have 5 items that have not been migrated yet, but I do not want to migrate 2 of them because I know they will throw an error.

Is is possible to remove those migrations from the 'queue' so to speak?

Thanks!


Solution

  • Remove the corresponding files from yourapp/migrations. There are all files stored after you called

    python manage.py makemigrations
    

    These files are named like 0001_initial.py.

    If there is no file, nothing happens when you call

    python manage.py migrate
    

    When your model is ready, you can create new migrations for your database.