Improve migrations support so that it can became public