Add migration script, refs #5971