May 102016

If you read the doc­u­ment­a­tion closely enough, of course all the inform­a­tion is there. Get­ting the order of oper­a­tions right, how­ever, can cause the odd issue.

Devel­op­ing Djan­go apps means apply­ing migra­tions, and those don’t always do what’s expec­ted. In that case, you can roll back to the n-1 migra­tion by using ./ migrate [app_label] {n-1_migration_label}, then delete the nth migra­tion, then edit the to try again.

To clean up the data­base from some third-party app you decide you don’t want after all, you use ./ migrate [app_label] zero to get rid of the migra­tions from that app. You have to run this before delet­ing the app from your file.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>