deal with foreign key properly in migration roll back function