ticket:3 add migration some fixes