summaryrefslogtreecommitdiffstats
path: root/internal/storage/storage.go
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-13 20:36:12 -0800
committerbndw <ben@bdw.to>2026-02-13 20:36:12 -0800
commit89b8948195f24df127b7ae656ab3f60bd1b49ac7 (patch)
tree2c6fc91e053039e4ad53ee0a72038b1b99f8c50c /internal/storage/storage.go
parent656748ea286ff7eac6cbe1b241ad31212892ba61 (diff)
refactor: simplify deletion handling (remove NIP-09 processing)
Remove deletion processing logic in favor of simpler approach: - Remove deletions table from schema - Delete deletions.go and deletions_test.go - Remove ProcessDeletion from EventStore interface - Kind 5 events now stored like any other event (no special handling) - Update storage test to expect 2 tables instead of 3 - All 41 tests passing
Diffstat (limited to 'internal/storage/storage.go')
-rw-r--r--internal/storage/storage.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/internal/storage/storage.go b/internal/storage/storage.go
index 806acac..d00d7bf 100644
--- a/internal/storage/storage.go
+++ b/internal/storage/storage.go
@@ -99,18 +99,6 @@ func (s *Storage) initSchema(ctx context.Context) error {
99 ON events(tags) 99 ON events(tags)
100 WHERE deleted = 0; 100 WHERE deleted = 0;
101 101
102 -- Deletion events (NIP-09)
103 CREATE TABLE IF NOT EXISTS deletions (
104 deleted_event_id TEXT PRIMARY KEY, -- ID of event being deleted
105 deletion_event_id TEXT NOT NULL, -- ID of deletion event
106 pubkey TEXT NOT NULL, -- Who requested deletion
107 created_at INTEGER NOT NULL,
108 FOREIGN KEY (deleted_event_id) REFERENCES events(id)
109 ) STRICT;
110
111 CREATE INDEX IF NOT EXISTS idx_deleted_event
112 ON deletions(deleted_event_id);
113
114 -- Replaceable events tracking (NIP-16, NIP-33) 102 -- Replaceable events tracking (NIP-16, NIP-33)
115 CREATE TABLE IF NOT EXISTS replaceable_events ( 103 CREATE TABLE IF NOT EXISTS replaceable_events (
116 kind INTEGER NOT NULL, 104 kind INTEGER NOT NULL,