Skip to content

Phase 2: Add the v2 Record entity with schema-version binding and validated bulk-upsert #220

Description

@JonnyTran

Introduce the record table as the first-class v2 row — fields JSONB keyed by column, a pinned schema_version_id, and the reference cross-schema join key — written through a validated bulk-upsert endpoint that coerces and checks every record against its pinned version's Pandera body (consuming the Phase 1 validate_record_fields helper) before persisting to Postgres as the source of truth. This makes extracted data formally bound to a schema version instead of an unbound blob, lets older records keep the shape they were extracted under while the schema advances, and adds GET /references/{reference} to assemble a document's project-level extraction as the union of its records across every schema. See spec §5–6 and the Phase 2 entry in the Phase 1 plan's downstream list.

Part of #218.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions