UPDATE revision.commit
    SET attributes = attributes || 'source=>long-task'::hstore
    WHERE attributes ? 'action' AND array_length(akeys(attributes),1) = 1
        AND (attributes -> 'action' = 'group-moved'
            OR attributes -> 'action' = 'group-modified-attributes'
            OR attributes -> 'action' = 'group-deleted');
