Adding call to index.php to run any migrations and moving index and compile to after_build time