backends icon indicating copy to clipboard operation
backends copied to clipboard

Fix mergeUsers mutation with regard to answers and other constraints

Open caillou opened this issue 5 years ago • 1 comments

As of now, the userId of an answer can not be modified due to the following PG trigger: https://github.com/orbiting/backends/blob/d3907139f210774b6720d0f68a22ab46bb09df02/packages/voting/migrations/sqls/20190907043631-questionnaire-improvements-up.sql#L20-L26

A possible workarround could be this: https://github.com/orbiting/backends/commit/0ad0aca9e714c5c213694a426429d68baeafc199

As of now, I am not certain if this PG trigger is important, and if the above code change would break something.

Additionally, mergeUsers() might fail due to unic constraints. We need to figure out a good way to automatically merge such users.

caillou avatar Sep 21 '20 15:09 caillou

We first do https://github.com/orbiting/backends/issues/517 to get an overview of problems we have with mergeUsers mutations

fuenkchen avatar Sep 20 '21 12:09 fuenkchen