Fix automatic migrations not work issue and modify model