change id in post and posthistory to int.