Fix error when altering Part table that uses "master" keyword#991
Merged
guzman-raphael merged 12 commits intodatajoint:masterfrom Mar 2, 2023
Merged
Fix error when altering Part table that uses "master" keyword#991guzman-raphael merged 12 commits intodatajoint:masterfrom
guzman-raphael merged 12 commits intodatajoint:masterfrom
Conversation
Contributor
Author
|
This solution does not handle the case of a part table using the "master" keyword in a more complex way, though. @schema
class Probe(dj.Manual):
definition = """
id: int
"""
class Shank(dj.Part):
definition = """
-> master
"""
class Electrode(dj.Part):
definition = """
-> master.Shank
""" |
rly
commented
Feb 9, 2022
guzman-raphael
requested changes
Feb 12, 2023
Collaborator
guzman-raphael
left a comment
There was a problem hiding this comment.
@rly Thank you for contributing to the fix! 💪
We appreciate your patience with our review but we've finally opened up some bandwidth to work through our PR queue.
Suggesting an alternative approach.
Contributor
Author
|
Thanks for taking a look at this PR. This issue comes up in the Frank Lab often. Syntax, integration, and style checks pass. Thanks for the comprehensive developer documentation! |
guzman-raphael
approved these changes
Mar 2, 2023
Collaborator
guzman-raphael
left a comment
There was a problem hiding this comment.
@rly Np. 🍻
Most of all, thanks to contributors like you for your help! LGTM
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.
Fix #936.
The core of the issue appears to be that the "master" keyword in the Part table definition does not match the name of a table in
context. So in this PR, I updatealteronly for Part tables so that "master" refers to the master table incontext. There may be a more elegant way to fix this issue, but this seems to do the trick.