Added pipeline db model and fixed migrate/manage/search call order.