Conversation
…on in _init_.py for tables
QSparks
approved these changes
Feb 24, 2026
pycds/alembic/versions/33179b5ae85a_add_network_display_name_column_to_meta_network.py
Show resolved
Hide resolved
Contributor
jameshiebert
left a comment
There was a problem hiding this comment.
Awesome, John! Thanks so much... this feels much better to me than the network_key version that preceded this (and had too much noise). Just a few small comments to consider, but otherwise it looks good to go.
| def upgrade(): | ||
| # Disable existing triggers before modifying table structure so that we don't accidentally track | ||
| # the intermediate states | ||
| disable_primary_table_triggers("meta_network") |
Contributor
There was a problem hiding this comment.
Excellent, this is so much cleaner than the o.g. version!
| sa.Column( | ||
| "network_display_name", | ||
| sa.String(), | ||
| nullable=True, |
Contributor
There was a problem hiding this comment.
Do we want this to be non nullable? What will break downstream if there's a NULL display name?
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.
Alternative approach to human readable identifiers within the network table this PR:
network_display_namecolumnnetwork_namesnetwork_namecolumn being updated (still allows inserts)network_nameif it isn't providedIt retains the same changes as from network_key for: