Skip to content

Plan for dropping unpreserved nma_pk_* columns after transfers are permanently complete #636

@kbighorse

Description

@kbighorse

Once legacy transfers from NM_Aquifer are permanently complete, the following columns are only used for transfer/audit and can be dropped after the prerequisites below. No application business logic depends on them.

Columns that can be dropped (unpreserved elsewhere):

  • Observation.nma_pk_waterlevels
  • Sample.nma_pk_waterlevels
  • Thing.nma_pk_welldata (after removing from OGC views)
  • Thing.nma_pk_wellscreens
  • Contact.nma_pk_owners (after removing from search vector)
  • Contact.nma_pk_waterlevels
  • Sensor.nma_pk_equipment

Prerequisites before dropping:

  1. PyGeoAPI: Update OGC thing views (e.g. in migration d5e6f7a8b9c0 or a new migration) to stop selecting thing.nma_pk_welldata, then drop the column.
  2. Search: Update the contact search vector definition so it no longer includes nma_pk_owners (see e4f7a9c0b2d3_add_search_vector_triggers.py and Contact model), then drop the column.

Scope: Add a short doc or ADR that records this plan and the prerequisites; implement the drop only when the team has decided transfers are permanently complete.

Metadata

Metadata

Assignees

Labels

technical debtTechnical debt and cleanup tasks

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions