Skip to content

Conversation

@jirhiker
Copy link
Member

Why

  • Add legacy NM_Aquifer tables (AssociatedData, SurfaceWaterPhotos, WeatherPhotos, Soil_Rock_Results) so their data can be modeled and transferred with the rest of the legacy dataset.

How

  • Added legacy ORM models with NMA_ table names in db/nma_legacy.py.
  • Added Alembic migrations for the new legacy tables.
  • Added transfer scripts for AssociatedData, SurfaceWaterPhotos, WeatherPhotos, and Soil_Rock_Results.
  • Added unit tests for each legacy model.
  • Wired SurfaceWaterPhotos, WeatherPhotos, and SoilRockResults into the transfer pipeline before Assets (parallel and sequential) and added metrics for new models.

Notes

  • Soil_Rock_Results uses a surrogate id primary key and is insert-only due to lack of a natural key.

Copilot AI review requested due to automatic review settings January 17, 2026 00:01
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for migrating four legacy NM_Aquifer tables (AssociatedData, SurfaceWaterPhotos, WeatherPhotos, Soil_Rock_Results) to enable their data transfer alongside the existing legacy dataset.

Changes:

  • Added ORM models for the four legacy tables with NMA_ prefix naming convention
  • Created Alembic migrations to define the database schema for these tables
  • Implemented transfer scripts with upsert logic (GlobalID/AssocID keys) for photos and AssociatedData, insert-only for Soil_Rock_Results
  • Integrated the new transferers into both parallel and sequential transfer pipelines before Assets processing

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
db/nma_legacy.py Defines ORM models for AssociatedData, SurfaceWaterPhotos, WeatherPhotos, and SoilRockResults
alembic/versions/c2f4a9d0b1e2_create_nma_associated_data.py Migration script to create the NMA_AssociatedData table
alembic/versions/d3a4b5c6d7e8_create_nma_surface_water_photos.py Migration script to create the NMA_SurfaceWaterPhotos table
alembic/versions/e4b5c6d7e8f9_create_nma_weather_photos.py Migration script to create the NMA_WeatherPhotos table
alembic/versions/f5a6b7c8d9e0_create_nma_soil_rock_results.py Migration script to create the NMA_Soil_Rock_Results table
transfers/associated_data.py Transfer logic for AssociatedData using upsert on AssocID
transfers/surface_water_photos.py Transfer logic for SurfaceWaterPhotos using upsert on GlobalID
transfers/weather_photos.py Transfer logic for WeatherPhotos using upsert on GlobalID
transfers/soil_rock_results.py Transfer logic for SoilRockResults using insert-only approach
transfers/transfer.py Wires new transferers into parallel and sequential pipelines
transfers/metrics.py Adds metrics tracking for the four new legacy models
tests/test_associated_data_legacy.py Unit tests for AssociatedData model
tests/test_surface_water_photos_legacy.py Unit tests for SurfaceWaterPhotos model
tests/test_weather_photos_legacy.py Unit tests for WeatherPhotos model
tests/test_soil_rock_results_legacy.py Unit tests for SoilRockResults model

Copilot AI review requested due to automatic review settings January 17, 2026 00:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings January 17, 2026 17:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

@jirhiker jirhiker merged commit ca1d1d7 into staging Jan 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants