Make status (i.e. for SubmissionHistory) a vocab table with ids ordered(New, LaunchFailed, Idle, Running, Held, Failed, Completed, Located)
(Total: 0.00 h)
... then checking for "is this submission completed" or "is this submission located" becomes a
select max(status) from submission_histories where submission_id = x;
select status from submission_histories where submission_id = x and update_time = (select max(update_time) from submission_hsitories where submission_id=x);
That is, when we want to check the status of things that oughtn't go backwards (like completed, located, etc.)
we can just take the max(status) by submission_id.
The current string arrangement is not ordered right -- i.e. "New" > "Located , but "Completed" < "Located", etc.