[2] Database foundation #2

Closed
opened 2026-06-13 18:59:15 +02:00 by dernbu · 0 comments
Owner

Objective

Implement the PostgreSQL 18 data model and migration foundation.

Scope

  • Add split Flyway migrations.
  • Create the catalog and ingest schemas and enable pg_trgm.
  • Create canonical/source judgment tables, children, artifacts, queue, discovery, reconciliation, and search tables.
  • Add foreign keys, checks, generated columns, indexes, and read-only views.
  • Add database integration tests.

Dependencies

Depends on #1.

Completion criteria

  • Migrations apply cleanly to an empty PostgreSQL 18 database.
  • Reapplying Flyway is a no-op.
  • Referential and check constraints behave as designed.
  • Generated search vectors and trigram indexes are available.

Closure

Complete all child issues, or merge a feature-branch pull request that resolves this issue.

Detailed requirements: docs/plans/high-level-plan.md, Phase 2.

## Objective Implement the PostgreSQL 18 data model and migration foundation. ## Scope - Add split Flyway migrations. - Create the `catalog` and `ingest` schemas and enable `pg_trgm`. - Create canonical/source judgment tables, children, artifacts, queue, discovery, reconciliation, and search tables. - Add foreign keys, checks, generated columns, indexes, and read-only views. - Add database integration tests. ## Dependencies Depends on #1. ## Completion criteria - Migrations apply cleanly to an empty PostgreSQL 18 database. - Reapplying Flyway is a no-op. - Referential and check constraints behave as designed. - Generated search vectors and trigram indexes are available. ## Closure Complete all child issues, or merge a feature-branch pull request that resolves this issue. Detailed requirements: `docs/plans/high-level-plan.md`, Phase 2.
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#2
No description provided.