Engine: fixes #3342 - foreign keys migration
Added back the foreign keys migration
Fixed a couple of tests for FK violations
More test fixes related to FK change
Merge pull request #3621 from parthaa/fk

Foreign Keys migration