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

feat(tags-db): populate tag and study_tag tables using pre-existing patch data in study_additional_data table #1929

Merged
merged 4 commits into from
Feb 14, 2024

Conversation

mabw-rte
Copy link
Contributor

@mabw-rte mabw-rte commented Feb 8, 2024

Context:
Currently, tags do not have a specific table but are directly retrieved from Patches using Python code.

Issue:
This coding paradigm results in filtering that cannot occur at the database level but rather post-query (posing a problem for pagination). It can also potentially slightly slow down API queries.

Solution in following steps:

  • Create two tables, tag and study_tag, to manage the many-to-many relationships between studies and tags. This step requires data migration.
  • Update endpoints and services
  • Create an update script to populate the newly created tables with pre-existing data.

Note:
This PR deals with the last step

@laurent-laporte-pro laurent-laporte-pro marked this pull request as draft February 13, 2024 14:58
@skamril skamril force-pushed the feature/1107-populate-tags-new-tables branch 2 times, most recently from 6fd4712 to 5ef35ad Compare February 13, 2024 15:01
@laurent-laporte-pro laurent-laporte-pro changed the title feature(tags-db): populate tag and study_tag tables using pre-existing patch data in study_additional_data table feature(tags-db): populate tag and study_tag tables using pre-existing patch data in study_additional_data table Feb 13, 2024
@mabw-rte mabw-rte changed the title feature(tags-db): populate tag and study_tag tables using pre-existing patch data in study_additional_data table feat(tags-db): populate tag and study_tag tables using pre-existing patch data in study_additional_data table Feb 13, 2024
@skamril skamril marked this pull request as ready for review February 13, 2024 18:36
@skamril skamril force-pushed the feature/1107-populate-tags-new-tables branch from 5ef35ad to 907fe57 Compare February 13, 2024 18:37
@mabw-rte mabw-rte force-pushed the feature/1107-populate-tags-new-tables branch 3 times, most recently from 3a775b5 to 852d844 Compare February 13, 2024 19:09
@mabw-rte mabw-rte force-pushed the feature/1107-populate-tags-new-tables branch from 852d844 to 5cf76cd Compare February 13, 2024 19:11
@pull-request-size pull-request-size bot added size/L and removed size/M labels Feb 14, 2024
Copy link
Contributor

@laurent-laporte-pro laurent-laporte-pro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ChatGPT pourrait ne pas être l'outil idéal pour rédiger ta documentation… 🤔😋

@mabw-rte mabw-rte merged commit 23a813c into dev Feb 14, 2024
7 checks passed
@mabw-rte mabw-rte deleted the feature/1107-populate-tags-new-tables branch February 14, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants