mirror of
https://github.com/prdlk/x-bookmarks-rss.git
synced 2026-08-02 09:31:37 +00:00
feat(db): add schema for bookmarks and meta tables
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
-- Bookmarks store. Rows accumulate so the feed keeps tweets even after they
|
||||
-- scroll out of X's 100-item bookmarks API window.
|
||||
CREATE TABLE IF NOT EXISTS bookmarks (
|
||||
id TEXT PRIMARY KEY, -- tweet id
|
||||
text TEXT NOT NULL,
|
||||
author_id TEXT,
|
||||
username TEXT,
|
||||
name TEXT,
|
||||
created_at TEXT, -- ISO 8601 from X
|
||||
media_urls TEXT, -- JSON array of media URLs
|
||||
url TEXT, -- permalink
|
||||
fetched_at INTEGER NOT NULL -- epoch ms when first stored
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_bookmarks_created ON bookmarks(created_at DESC);
|
||||
|
||||
-- Tiny key/value table for OAuth tokens, user id, PKCE verifiers, and last_sync.
|
||||
CREATE TABLE IF NOT EXISTS meta (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT NOT NULL
|
||||
);
|
||||
Reference in New Issue
Block a user