I created a custom migration "0000_initial_data.py" and I want that to get applied after all the other migrations are done. Though when I try to use ____latest____ in the dependencies I get "dependencies reference nonexistent parent node" error I feel it is trying to find ____latest____ named migration in the folder but it is unable to find. I got an idea of finding the latest migration in myapp/migrations/ using "ls -Art | tail -n 1" which gave me 0001_initial.pyc [pyc] file rather than the latest migration .py file. Though even if I get the name of the latest migration I have to replace in the custom migration file using a shell script like
$ replace '__latest__' 'output of ls -Art' -- 0000_initial_data.py
as am automating my deployment. I would like to know the best way to get the latest migration from all myapps in the project and plug my custom migration after it.
Note: using django==1.8.13, ubuntu 14.04, python 2.7