Adds specs
Fixes duplicates in workflow transitions
Fixes postgres errors
Merge pull request #905 from opf/fix/transition_duplicates_in_workflow_3113

[FIX 1/2] Transition duplicates in workflow 3113