sanger/sequencescape — pull request #711 by JamesGlover (2013-01-02 11:45:40+00:00)
Title: 39688689 repair requests with missing submissions

Just a quick migration to strip out the submission id from requests where the submission has been deleted. Only touches those requests which are either failed or cancelled.

Note, this takes place in an execute as unfortunately update_all ignores any joins, even when scoped. As we need to look across the join to determine which records to update, this makes it unsuitable.

I've checked things on a recent production dump and its only touching the records I expect it to.