Feed Reader

schema.js 2 lines

Files · 10
12// Kept byte-for-byte equivalent to schema.sql; bundled without a runtime fetch.
export default "CREATE TABLE feeds (\n  id INTEGER PRIMARY KEY AUTOINCREMENT,\n  title TEXT NOT NULL /* Subscription title shown in the reader. */,\n  url TEXT NOT NULL UNIQUE /* Subscription feed URL, stored as https. An http address is upgraded when subscribing. */,\n  checked_at TEXT /* Last check attempt, UTC ISO 8601. */,\n  error TEXT /* Last check error, or null after success. */,\n  subscribed INTEGER NOT NULL DEFAULT 1 CHECK (subscribed IN (0, 1)) /* 0 retains item identity after unsubscribing. */\n);\nCREATE TABLE items (\n  id INTEGER PRIMARY KEY AUTOINCREMENT,\n  feed_id INTEGER REFERENCES feeds(id) /* Subscription; null for standalone or file-imported items. */,\n  guid TEXT,\n  guid_is_perma_link INTEGER NOT NULL DEFAULT 1 CHECK (guid_is_perma_link IN (0, 1)),\n  title TEXT,\n  link TEXT,\n  description TEXT,\n  author TEXT,\n  category TEXT,\n  comments TEXT,\n  pub_date TEXT,\n  source TEXT /* RSS <source>: original publication channel, not the subscription. */,\n  source_url TEXT /* RSS <source> URL: original publication feed, not the subscription URL. */,\n  enclosure_url TEXT,\n  enclosure_length INTEGER CHECK (enclosure_length >= 0),\n  enclosure_type TEXT,\n  CHECK (title IS NOT NULL OR description IS NOT NULL)\n);\n";