searchhut/schema.sql
Umar Getagazov fde8b75efd Drop crawl schedule-related fields
They were unused.
2022-07-11 17:50:44 +02:00

27 lines
727 B
SQL

CREATE TABLE domain (
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
hostname text NOT NULL,
authoritative boolean NOT NULL,
tags text[] NOT NULL,
exclusion_patterns text[] NOT NULL DEFAULT '{}',
last_index_date timestamptz,
crawl_duration interval
);
CREATE TABLE page (
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
domain_id integer NOT NULL REFERENCES domain(id),
source varchar NOT NULL,
url text NOT NULL UNIQUE,
checksum bytea NOT NULL UNIQUE,
last_index_date timestamptz NOT NULL,
fts_vector tsvector NOT NULL,
javascript boolean NOT NULL,
title text,
language text,
description text,
author text,
excerpt text
);
CREATE INDEX idx_page_content ON page USING GIN (fts_vector);