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

feature(tag-db): add tag and study_tag tables to the db (migration) #1923

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

mabw-rte
Copy link
Contributor

@mabw-rte mabw-rte commented Feb 2, 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, Tags 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 first step.

@mabw-rte mabw-rte self-assigned this Feb 2, 2024
@mabw-rte mabw-rte force-pushed the feature/1107-tags-db-migration branch 2 times, most recently from 47bc1ee to 138304f Compare February 2, 2024 13:52
@laurent-laporte-pro laurent-laporte-pro added this to the v2.16.4 milestone Feb 2, 2024
@laurent-laporte-pro laurent-laporte-pro force-pushed the feature/1107-tags-db-migration branch from 138304f to 624f0f9 Compare February 2, 2024 13:57
@laurent-laporte-pro laurent-laporte-pro merged commit bbbf3e3 into dev Feb 2, 2024
6 checks passed
@laurent-laporte-pro laurent-laporte-pro deleted the feature/1107-tags-db-migration branch February 2, 2024 14:24
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