fixed migration with belongs_to and reference bug