added random_order to host table schema

This commit is contained in:
Joe Lothan 2026-05-19 10:47:05 -04:00
parent e6d5d5175c
commit 1d5b7bd374

View file

@ -13,7 +13,8 @@ CREATE TABLE IF NOT EXISTS hosts (
html_title TEXT,
iframe_allowed BOOLEAN,
best_icon_s3_key TEXT,
parsed BOOLEAN DEFAULT FALSE
parsed BOOLEAN DEFAULT FALSE,
random_order REAL DEFAULT random()
);
CREATE TABLE IF NOT EXISTS icons (
@ -40,3 +41,6 @@ CREATE INDEX IF NOT EXISTS idx_icons_host_id ON icons(host_id);
-- For WARC parsing cursor
CREATE INDEX IF NOT EXISTS idx_hosts_unparsed ON hosts(id) WHERE parsed = FALSE;
-- For bundle generation pagination in random order
CREATE INDEX IF NOT EXISTS idx_hosts_random ON hosts(random_order);