Files
geointel/skills/postgis-migration/SKILL.md
T
Jens faeb58ef6d
GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
Initial public release
2026-08-31 21:56:53 +02:00

45 lines
1.2 KiB
Markdown

# Skill: PostGIS Migration
Use this skill when creating database models, migrations, geometry storage or spatial indexes.
## Read first
- `docs/DATABASE_SCHEMA.md`
- `docs/DATABASE_IMPLEMENTATION_PLAN.md`
- `docs/standards/GIS_STANDARDS.md`
- `docs/specs/STATE_MACHINES.md`
- relevant ADRs
## Spatial rules
- PostgreSQL + PostGIS is mandatory.
- Store canonical geometry in PostGIS geometry columns.
- Preserve original CRS metadata on datasets.
- Normalize internal spatial operations according to GIS standards.
- Create spatial indexes for queryable geometries.
- Use explicit units for area, distance and length.
## Migration checklist
- [ ] Add model.
- [ ] Add migration.
- [ ] Add indexes.
- [ ] Add constraints.
- [ ] Add state enum where required.
- [ ] Add rollback-safe migration where practical.
- [ ] Add fixture/test coverage for geometry roundtrip.
## Forbidden shortcuts
- No geometry as unvalidated plain text for canonical records.
- No silent CRS assumptions.
- No schema drift from docs without updating the contract.
## Completion report fields
- Tables changed.
- Geometry columns added.
- Indexes added.
- Migration commands run.
- Compatibility risks.