This repository was archived by the owner on Apr 6, 2022. It is now read-only.

Description
As of now, the userId of an answer can not be modified due to the following PG trigger:
|
IF ( |
|
TG_OP = 'UPDATE' AND |
|
NEW."userId" IS NOT NULL AND |
|
NEW."userId" != OLD."userId" |
|
) THEN |
|
RAISE EXCEPTION 'PSQL EXCEPTION: answers must not switch users'; |
|
END IF; |
A possible workarround could be this: 0ad0aca
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.