Add very basic crawl job

Loops through feeds and adds items from each feed.
This commit is contained in:
2023-05-09 23:46:42 -04:00
parent 89fdf8f95a
commit ae8f15f19b
18 changed files with 327 additions and 56 deletions

View File

@@ -10,6 +10,8 @@ CREATE TABLE IF NOT EXISTS "feeds" (
"updated_at" timestamp(3) NOT NULL,
"deleted_at" timestamp(3)
);
CREATE INDEX "feeds_deleted_at" ON "feeds" ("deleted_at");
CREATE UNIQUE INDEX "feeds_url" ON "feeds" ("url");
CREATE TABLE IF NOT EXISTS "items" (
"id" SERIAL PRIMARY KEY NOT NULL,
@@ -21,3 +23,5 @@ CREATE TABLE IF NOT EXISTS "items" (
"updated_at" timestamp(3) NOT NULL,
"deleted_at" timestamp(3)
);
CREATE INDEX "items_deleted_at" ON "items" ("deleted_at");
CREATE UNIQUE INDEX "items_url_and_feed_id" ON "items" ("url", "feed_id");