fix: ignore so we don't error if already present in the db

This commit is contained in:
DaRacci committed 2022-10-10 15:00:46 +11:00
1 parent fb5144f121
commit e3b4e1176a
2 files changed
+2 -2

No files matched your search

@@ -52,7 +52,7 @@ public interface MySQLSaveOnChange extends SaveOnChange {
@SqlUpdate("UPDATE carbon_users SET whisperreplytarget = UNHEX(REPLACE(:whisperReplyTarget, '-', '')) WHERE id = UNHEX(REPLACE(:id, '-', ''))")
int saveWhisperReplyTarget(final UUID id, final @Nullable UUID whisperReplyTarget);
@SqlUpdate("INSERT INTO carbon_ignores (id, ignoredplayer) VALUES (UNHEX(REPLACE(:id, '-', '')), UNHEX(REPLACE(:ignoredPlayer, '-', '')))")
@SqlUpdate("INSERT IGNORE INTO carbon_ignores (id, ignoredplayer) VALUES (UNHEX(REPLACE(:id, '-', '')), UNHEX(REPLACE(:ignoredPlayer, '-', '')))")
int addIgnore(final UUID id, final UUID ignoredPlayer);
@SqlUpdate("DELETE FROM carbon_ignores WHERE id = UNHEX(REPLACE(:id, '-', '')) AND ignoredplayer = UNHEX(REPLACE(:ignoredPlayer, '-', ''))")