move models migrate config to env