Conversation
Fixes #2662 The column 'current_verion' in repo_deps_libyear table was misspelled (missing 's'). This commit: - Adds Alembic migration (rev 38) to rename the column - Drops and recreates explorer_libyear_detail materialized view - Updates ORM model, task code, and all schema files for consistency Note: PostgreSQL supports simple column renames via ALTER TABLE, so no temp tables or data copying is needed. Signed-off-by: Shlok Gilda <gildashlok@hotmail.com>
Signed-off-by: Shlok Gilda <gildashlok@hotmail.com>
Old migrations should be immutable - the typo fix belongs only in migration 38, not in historical migrations 1 and 4. Signed-off-by: Shlok Gilda <gildashlok@hotmail.com>
The explorer_libyear_detail view was dropped in migration 25, so no view manipulation is needed - just rename the column. Signed-off-by: Shlok Gilda <gildashlok@hotmail.com>
Contributor
Author
|
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.
Note
This PR was ported from augurlabs/augur#3482 filed by @shlokgilda because the contribution was deemed to still be useful.
Description
current_verioncolumn tocurrent_versioninrepo_deps_libyeartableexplorer_libyear_detailmaterialized viewThis PR fixes #29
Notes for Reviewers
renaming wont require temp tables and data copying as this isn't necessary for PostgreSQL - column renames are simple metadata operations (
ALTER TABLE ... RENAME COLUMN). The only complexity is the materialized view that references the column, which we drop and recreate with the corrected name. No data copying involved.Signed commits
AI Disclosure: Used Claude Code to write this PR draft, comments in the alembic migration and verify the migration.