Files
geointel/prompts/codex/day-1/03_DATABASE_AND_DOMAIN.md
T
Codex 6ea3586a3e
GeoIntel CI / docs-smoke (push) Has been cancelled
GeoIntel CI / contract-smoke (push) Has been cancelled
Initial GeoIntel V1 foundation
2026-06-16 23:36:32 +02:00

882 B

Pass 03 — Database and Domain Foundation

Goal

Add the PostGIS-ready database/domain foundation.

Implement

  • SQLAlchemy database setup.
  • Alembic migration setup.
  • Core models: Project, Area, Dataset, AnalysisRun, Export.
  • Pydantic schemas matching API contract style.
  • Geometry handling strategy ready for PostGIS.

Constraints

  • Do not store geometry as arbitrary strings in final domain models.
  • If test environment cannot run PostGIS, isolate integration tests and keep unit tests safe.
  • Do not remove future raster/AI fields because V1 starts smaller.

Validation

  • Backend imports.
  • Model metadata initializes.
  • Migration command documented or executed if environment allows.
  • Unit tests pass.

Acceptance

  • Domain model can support project -> area -> dataset -> analysis.
  • Geometry metadata and CRS are represented.
  • Execution log updated.