Extracted methods from rake file + fixed custom migration