19.0.0 (2026-05-26)
- build(docker)!: Upgrade postgis to 17-3.5 and switch test container to debian slim (34055ba)
- refactor(schema)!: Move canonical tables from pcio.* to public.* (8e10d36)
Bug Fixes
- Docker: Enable postgis (7e53fda)
- spec,api,docs: Align OpenAPI schemas, API behavior, and documentation for v13 (4561fac)
Documentation
- openapi: Expand ScottishPostcodes for full SPD coverage (5b04b0a)
Features
- api: Return Senedd Cymru constituency from postcode lookups (7b43570)
- ingest: Remove ingest tooling and support-table models (6d37c16)
- models: Delete the model layer (ab51e11)
- PgDump: Expand exported dataset (ebbf184)
- queries: Introduce api/app/queries/db.ts and migrate utils (5a85bc4)
- queries: Migrate outcodes_controller to api/app/queries/outcodes (5fcdb22)
- queries: Migrate places_controller to api/app/queries/places (52e4abd)
- queries: Migrate postcodes_controller to api/app/queries/postcodes (18a69cb)
- queries: Migrate scottish_postcodes_controller to full SPD shape (e4e077c)
- queries: Migrate terminated_postcodes to api/app/queries (62c1440)
- spec,docs: Add Senedd Cymru constituency fields to Postcode schema (c927d3d)
- test: Replace model-driven seed with dump-based pipeline (364811b)
Performance Improvements
- DB: Add partial indexes (5d0c2b2)
- db: tune Postgres for read-only workload, add pg_prewarm (971f267)
- outcodes: Read from pcio.outcodes matview instead of aggregating on the fly (466a283)
- queries: Batch bulk postcode + reverse-geo endpoints into one SQL each (7743d9e)
- test: Strip pnpm install from test image build (480da6d)
BREAKING CHANGES
- All canonical data now lives under the public schema.
Existing deployments using the old pcio.* layout must reload from the
new dump (or migrate the schema) before pulling this version. The
test seed (test/seed/v13.sql.gz) needs regenerating against a public.*
source dump. - Postgres major version upgrade. Existing PG16 data volumes
are not in-place compatible with the PG17 server — operators must drop the
volume (or pg_upgrade) before pulling the new images. The published pg_dump
underlatestmust be regenerated from PG17 to keep the format aligned. - models: api/app/models/* removed. Any external consumer
that imported from postcodes.io's compiled output (we don't think
there is one) must migrate to api/app/queries/*. - queries: GET /scotland/postcodes/:postcode now returns the
full SPD record. Existing fields (postcode,
scottish_parliamentary_constituency,
codes.scottish_parliamentary_constituency) preserved at their
canonical names. - ingest: removed CLIs postcodesio-onspd, postcodesio-scotpd,
and postcodesio-oson. Ingestion is no longer this package's
responsibility - consume a published pg_dump instead. - openapi: GET /scotland/postcodes/:postcode response shape
expands from 3 fields to a full SPD record. Existing fields
(postcode, scottish_parliamentary_constituency, codes.scottish_parliamentary_constituency)
are preserved under their canonical names. - test: npm scripts setup_test_db, test:seed and test:clear
have been removed. test:create no longer compiles TypeScript; it
shells to bin/load_test_seed and expects test/seed/v13.sql.gz to be
present (regenerate with bin/generate_test_seed against a fully loaded
dev DB). - PgDump: This update restructures the database into just three tables:
- onspd (ONS Postcode Directory)
- spd (Scottish Postcode Directory)
- osopennames (OS Open Names)
Tables are now fully denormalised for performance