fix migrations, model relations, add pry