[2.2] catalog.lawnet_judgment #19

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

Parent

#2 — depends on [2.1]

Schema

CREATE TABLE catalog.lawnet_judgment (
  id               bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
  judgment_id      bigint  NULL REFERENCES catalog.judgment ON DELETE RESTRICT,
  docid            text    NOT NULL UNIQUE,
  citation         text    NOT NULL,
  title            text    NULL,
  decision_date    date    NULL,
  court            text    NULL,
  case_number      text    NULL,
  is_available     boolean NOT NULL DEFAULT true,
  search_payload   jsonb   NOT NULL,
  metadata_payload jsonb   NULL,
  UNIQUE (docid)
);

Rules: judgment_id is nullable; automatic ingestion fills it but must never overwrite a non-null value.

Done when

  • FK to catalog.judgment enforced (nullable, RESTRICT)
  • docid uniqueness enforced
## Parent #2 — depends on [2.1] ## Schema ```sql CREATE TABLE catalog.lawnet_judgment ( id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY, judgment_id bigint NULL REFERENCES catalog.judgment ON DELETE RESTRICT, docid text NOT NULL UNIQUE, citation text NOT NULL, title text NULL, decision_date date NULL, court text NULL, case_number text NULL, is_available boolean NOT NULL DEFAULT true, search_payload jsonb NOT NULL, metadata_payload jsonb NULL, UNIQUE (docid) ); ``` **Rules:** `judgment_id` is nullable; automatic ingestion fills it but must never overwrite a non-null value. ## Done when - FK to `catalog.judgment` enforced (nullable, RESTRICT) - `docid` uniqueness enforced
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#19
No description provided.