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.
Introduce the
recordtable as the first-class v2 row —fieldsJSONB keyed by column, a pinnedschema_version_id, and thereferencecross-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 1validate_record_fieldshelper) 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 addsGET /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.