The foreign key must be dropped otherwise changes in the ir.model.field table can fail because of the foreign key constraint. The migration should always remove all unused constraints. issue5241 review17741002