Fixes #3502 : Add migration script to add self validation