Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to unapply the very first migration in django 1.7 [duplicate]

It looks like rolling back to any migration is possible using:

./manage.py migrate <app> <migration_to_go_to>

However, this requires an actual migration to be applied, and I need to rollback the very first migration!

Specifically, I want to rollback the built-in "sessions" app (which only has one migration, "0001_initial".)

Is there a way to achieve this?

Thanks!

like image 719
moomima Avatar asked Nov 26 '14 08:11

moomima


1 Answers

Just do:

./manage.py migrate <app> zero

like image 121
seddonym Avatar answered Oct 02 '22 01:10

seddonym