Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve tension between instrumentproductlink and product.instrument_id #105

Open
jtniehof opened this issue Dec 14, 2021 · 1 comment
Open

Comments

@jtniehof
Copy link
Member

Another from #102. There is both an instrumentproductlink table, implying instruments and products are a many-to-many, and an instrument_id column in product, implying each product only has one instrument. I haven't gone digging deeply to figure out which is actually used when doing, say, a reprocess by instrument.

My gut feeling says there should be only one of these two mechanisms, but maybe we have a "primary" instrument and "others". This is probably going to involve a db migration and some code checking to make sure all uses the same mechanism.

OS, Python version, and dependency version information:

Linux-4.15.0-163-generic-x86_64-with-Ubuntu-18.04-bionic
sys.version_info(major=2, minor=7, micro=17, releaselevel='final', serial=0)
sqlalchemy=1.1.11

Version of dbprocessing

#102 , i.e. 1d5a938 or jtniehof/dbprocessing:document_tables

Closure condition

This issue should be closed when a PR is merged with the mapping approach chosen, code updated (with tests), database migration included, and any documentation updates.

@balarsen
Copy link
Contributor

I agree with

My gut feeling says there should be only one of these two mechanisms, but maybe we have a "primary" instrument and "others". This is probably going to involve a db migration and some code checking to make sure all uses the same mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants