Fix for a content view migration issue

Previously, a removal of a content view would not cascade properly across changesets
This caused dangling references in changesets. This commit fixes that issue
by removing all references in a changeset which has a content view that no longer exists.
Merge pull request #3311 from parthaa/foreign-key-migration

Fix for a content view migration issue