fix hash only channel issue

the db was adding rows for any observation of a hash
without a known key
This commit is contained in:
Enot (ded) Skelly committed 2026-05-26 10:53:49 -07:00
1 parent 9be028d067
commit 5321151f7e
1 file changed
+4
+4
View File
@@ -275,6 +275,10 @@ CREATE TABLE channels (
UNIQUE (channel_hash, key_fingerprint)
);
CREATE UNIQUE INDEX idx_channels_hash_no_key
ON channels (channel_hash)
WHERE key_fingerprint IS NULL;
CREATE INDEX idx_channels_last_seen ON channels(last_seen DESC);
CREATE INDEX idx_channels_hash ON channels(channel_hash);
CREATE INDEX idx_channels_hashtag ON channels(hashtag) WHERE hashtag IS NOT NULL;