You can try this command:
python manage.py showmigrations -p | sed -e 's/\[ ] \(.*\)\.\(.*\)/\1 \2/' | xargs -L1 python manage.py sqlmigrate
Here is what it does:
1. "python manage.py showmigrations -p" shows all migrations in the order they will be applied as a list with checkboxes.
2. "sed -e 's/\[ ] \(.*\)\.\(.*\)/\1 \2/'" will remove the checkboxes and split the migrations into app and migration name
3. "xargs -L1 python manage.py sqlmigrate" will execute python manage.py sqlmigrate for each line
Alternatively, why not just call python manage.py migrate?