Allow overwriting of previously-delted profiles

This commit is contained in:
Jon Chambers 2021-12-01 11:41:28 -05:00 committed by Jon Chambers
parent f7ff8e3837
commit acfcb18f29
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,9 @@ public class Profiles implements ProfilesStore {
+ AVATAR + " = EXCLUDED." + AVATAR + ", "
+ ABOUT + " = EXCLUDED." + ABOUT + ", "
+ ABOUT_EMOJI + " = EXCLUDED." + ABOUT_EMOJI + ", "
+ PAYMENT_ADDRESS + " = EXCLUDED." + PAYMENT_ADDRESS)
+ PAYMENT_ADDRESS + " = EXCLUDED." + PAYMENT_ADDRESS + ", "
+ DELETED + " = FALSE, "
+ COMMITMENT + " = CASE WHEN profiles." + DELETED + " = TRUE THEN EXCLUDED." + COMMITMENT + " ELSE profiles." + COMMITMENT + " END")
.bind("uuid", uuid)
.bind("version", profile.getVersion())
.bind("name", profile.getName())