Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

downgrading to previous migration django

Reversing migrations¶
Migrations can be reversed with migrate by passing 
the number of the previous migration.
For example, to reverse migration books.0003:

$ python manage.py migrate books 0002
Operations to perform:
  Target specific migration: 0002_auto, from books
Running migrations:
  Rendering model states... DONE
  Unapplying books.0003_auto... OK
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #downgrading #previous #migration #django
ADD COMMENT
Topic
Name
6+5 =