Solve froeign key can not remove bug.

these parameters order for `sprintf()` is wrong.