From c69189dbf844842049ca8a511803da89b5d1d9e9 Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Wed, 1 Oct 2025 23:43:22 -0700
Subject: add news feed archival to db

---
 schema.sql | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'schema.sql')

diff --git a/schema.sql b/schema.sql
index 5c2e2f0..88e1120 100644
--- a/schema.sql
+++ b/schema.sql
@@ -1,5 +1,5 @@
 CREATE TABLE IF NOT EXISTS news (
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
+    news_id VARCHAR(255) NOT NULL PRIMARY KEY,
     date TEXT NOT NULL,
     identifier TEXT NOT NULL,
     type TEXT,
@@ -13,11 +13,10 @@ CREATE TABLE IF NOT EXISTS news (
 );
 
 CREATE TABLE IF NOT EXISTS news_images (
-    id INTEGER PRIMARY KEY AUTOINCREMENT,
-    news_id INTEGER NOT NULL,
+    news_id VARCHAR(255) NOT NULL PRIMARY KEY,
     image_url TEXT NOT NULL,
     link_url TEXT,
-    FOREIGN KEY (news_id) REFERENCES news(id) ON DELETE CASCADE
+    FOREIGN KEY (news_id) REFERENCES news(news_id) ON DELETE CASCADE
 );
 
 CREATE TABLE IF NOT EXISTS summarization (
-- 
cgit v1.2.3

