Skip to content

Commit

Permalink
add unique constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
aarshkshah1992 committed Jun 20, 2024
1 parent d81803d commit 11ba4dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chain/events/filter/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ const (
id INTEGER PRIMARY KEY,
height INTEGER NOT NULL,
tipset_key_cid BLOB NOT NULL,
reverted INTEGER NOT NULL
reverted INTEGER NOT NULL,
UNIQUE(height, tipset_key_cid)
)`

createIndexEventsSeenHeight = `CREATE INDEX IF NOT EXISTS events_seen_height ON events_seen (height);`
Expand Down

0 comments on commit 11ba4dd

Please sign in to comment.