PR from GCI staging_done branch

Had to do some conflict resolution as well. :|
...well - or RESTRICT. But not SET NULL.