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

Move blocks to their own collection instead of being embedded documents within items #48

Open
jdbocarsly opened this issue Oct 10, 2021 · 0 comments
Labels
API For issues/PRs pertaining to the API

Comments

@jdbocarsly
Copy link
Member

For more flexibility with the data model, we should move blocks into their own collection instead of having them live as embedded documents in the blocks_obj field of an item.

Need to decide:

  • The ids for the blocks. Currently, they are randomly generated HTML-friendly strings, but we could choose to use the mongo ObjectIDs

  • Blocks could potentially be associated with more than one sample (or other item). We should probably change the item_id field to something like item_ids and then also store the block id in each item it is associated for so that there is two-way referencing of the items and blocks.

    • If we do this, perhaps a block should still have (the option of) having a "primary" item_id
@jdbocarsly jdbocarsly added the API For issues/PRs pertaining to the API label Oct 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API For issues/PRs pertaining to the API
Projects
None yet
Development

No branches or pull requests

1 participant