fix altering relation name issue in php