Added workflow definition upsert for postgresql