Solve foreign key can not remove bug.