Add indices to foreign keys and clean up migrations