fix(database): migrate valid_start_mjd / valid_end_mjd columns in caltables (fixes #102) - #130
Open
jakobtfaber wants to merge 1 commit into
Open
fix(database): migrate valid_start_mjd / valid_end_mjd columns in caltables (fixes #102)#130jakobtfaber wants to merge 1 commit into
jakobtfaber wants to merge 1 commit into
Conversation
…tables (fixes #102) Co-Authored-By: Jakob Faber <jfaber@caltech.edu>
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.
Summary
The
caltablesschema indsa110_continuum/database/unified.pyhas includedvalid_start_mjd/valid_end_mjdin theCREATE TABLEfor new databases, but the migration function_migrate_caltables_schemaonly added the provenance text columns (source_ms_path,solver_command, etc.). Existingpipeline.sqlite3databases created before those columns therefore raisedno such column: valid_start_mjdwhen the pipeline tried to register generated calibration tables (#102).Changes
dsa110_continuum/database/unified.py: addvalid_start_mjdandvalid_end_mjdto thenew_columnslist in_migrate_caltables_schema, guarded by the existingPRAGMA table_infoprobe. TheCREATE TABLEandidx_caltables_validindex code are unchanged; the index is still created inensure_calibration_databaseafter the migration.Verification
make test-cloud PYTHON=/home/ubuntu/.venv-dsa110-312/bin/pythonpasses (200 passed).ruff check dsa110_continuum/database/unified.pyreports five pre-existing style/name issues in the file that are unrelated to this change (I001, F821 atquery_df, and W291/W293 on migration SQL strings); I did not bulk-fix them per repo guidance.pipeline.sqlite3with the oldcaltablesschema successfully runs_migrate_caltables_schemaand caltable registration no longer logsno such column: valid_start_mjd.Closes #102.