BDMS-471,472,473#400
Merged
Merged
Conversation
…aceWaterPhotos, WeatherPhotos, and SoilRockResults
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
There was a problem hiding this comment.
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
How
Notes