[2.13] ingest.discovery_run #30

Closed
opened 2026-06-13 23:54:33 +02:00 by dernbu · 0 comments
Owner

Parent

#2 — depends on [2.12]

Schema

CREATE TABLE ingest.discovery_run (
  id                  bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  source              text   NOT NULL CHECK (source IN (lawnet, elitigation)),
  status              text   NOT NULL,
  current_pass        integer NOT NULL DEFAULT 1,
  current_page        integer NOT NULL DEFAULT 1,
  reported_totals     jsonb  NULL,
  stabilization_state jsonb  NULL,
  started_at          timestamptz NOT NULL DEFAULT now(),
  completed_at        timestamptz NULL
);

Rules: Only the latest run per source is kept; starting a new run replaces the previous.

Done when

  • source CHECK enforced
  • Index on (source, status) for looking up active runs
## Parent #2 — depends on [2.12] ## Schema ```sql CREATE TABLE ingest.discovery_run ( id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, source text NOT NULL CHECK (source IN (lawnet, elitigation)), status text NOT NULL, current_pass integer NOT NULL DEFAULT 1, current_page integer NOT NULL DEFAULT 1, reported_totals jsonb NULL, stabilization_state jsonb NULL, started_at timestamptz NOT NULL DEFAULT now(), completed_at timestamptz NULL ); ``` **Rules:** Only the latest run per source is kept; starting a new run replaces the previous. ## Done when - `source` CHECK enforced - Index on `(source, status)` for looking up active runs
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dernbu/lawnet-scraper#30
No description provided.