Can update roles of one citizen on workgroup

This commit is contained in:
2020-06-02 14:20:35 +02:00
parent 9b79301662
commit 10928251e6

View File

@@ -8,6 +8,7 @@ begin
(member#>>'{citizen, id}')::uuid,
(select array_agg(t) from json_array_elements_text(member#>'{roles}') t)
)
on conflict do nothing;
on conflict (workgroup_id, citizen_id) do update set
roles = excluded.roles;
end;
$$;