Answers for "downgrading to previous migration django"

0

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
Posted by: Guest on May-04-2022
0

downgrading to previous migration django

If you want to reverse all migrations applied for an app, 
use the name zero:
$ python manage.py migrate books zero
Operations to perform:
  Unapply all migrations: books
Running migrations:
  Rendering model states... DONE
  Unapplying books.0002_auto... OK
  Unapplying books.0001_initial... OK
Posted by: Guest on May-04-2022

Code answers related to "downgrading to previous migration django"

Python Answers by Framework

Browse Popular Code Answers by Language