You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: harmony/harmonydb/sql/20231103-chain_sends.sql
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
createtablemessage_sends
1
+
createtableif not exists message_sends
2
2
(
3
3
from_key textnot null,
4
4
to_addr textnot null,
@@ -37,14 +37,14 @@ comment on column message_sends.send_time is 'time when the send task was execut
37
37
comment on column message_sends.send_success is 'whether this message was broadcasted to the network already, null if not yet attempted, true if successful, false if failed';
38
38
comment on column message_sends.send_error is 'error message if send_success is false';
39
39
40
-
createunique indexmessage_sends_success_index
40
+
createunique indexif not exists message_sends_success_index
41
41
on message_sends (from_key, nonce)
42
42
where send_success is not false;
43
43
44
44
comment on index message_sends_success_index is
45
45
'message_sends_success_index enforces sender/nonce uniqueness, it is a conditional index that only indexes rows where send_success is not false. This allows us to have multiple rows with the same sender/nonce, as long as only one of them was successfully broadcasted (true) to the network or is in the process of being broadcasted (null).';
0 commit comments