Skip to content

Commit 475880a

Browse files
committed
Deletions, i got some crazy clankers to write this and I may regret it in the future
1 parent 1915707 commit 475880a

9 files changed

Lines changed: 1025 additions & 115 deletions

File tree

migrations/006-deletions/up.sql

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CREATE TABLE IF NOT EXISTS deleted_events (
2+
event_id TEXT PRIMARY KEY,
3+
author_pubkey TEXT,
4+
deleted_at INTEGER NOT NULL DEFAULT (unixepoch()),
5+
source_event_id TEXT
6+
);
7+
8+
CREATE INDEX idx_deleted_events_author ON deleted_events (author_pubkey);
9+
10+
CREATE TABLE IF NOT EXISTS gift_wrap_map (
11+
wrap_id TEXT PRIMARY KEY,
12+
inner_id TEXT NOT NULL,
13+
recipient_pubkey TEXT,
14+
created_at INTEGER
15+
);
16+
17+
CREATE INDEX idx_gift_wrap_inner_id ON gift_wrap_map (inner_id);

migrations/007-trash/up.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CREATE TABLE IF NOT EXISTS trash_events (
2+
event_id TEXT PRIMARY KEY,
3+
trashed_at INTEGER NOT NULL DEFAULT (unixepoch()),
4+
purge_after INTEGER NOT NULL
5+
);
6+
7+
CREATE INDEX idx_trash_events_purge_after ON trash_events (purge_after);

0 commit comments

Comments
 (0)