Add migration pre-check and plugin db check util