Fix initial migrate bug

 * Fix the installed apps order to fix the missing projects table error
   when doing initial migration
Merge pull request #780 from cheeming/fix-installed-apps-order

Fix initial migrate bug