Add guard migrate to call migration automatically