fixed model relations, tests and add new migration