[1.8.x] Fixed #25168 -- Documented how to avoid foreign key constraint error after upgrading to 1.8. Backport of 70912e13 from master