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(model): move userData content in a files storage #1193

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

a-lubert
Copy link
Collaborator

@a-lubert a-lubert commented Mar 6, 2025

  • chore(schema): split the user_data schema in half (table and view)
  • chore(schema): migrate the data_content column on the file system
  • feat(model): manage the user_data file with the userDataModel class

Copy link

github-actions bot commented Mar 6, 2025

Jest Coverage Comment

Summary

Lines Statements Branches Functions
Coverage: 83%
83.21% (565/679) 82.11% (248/302) 84.92% (107/126)
Coverage Report (83%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files83.2182.1184.9283.28 
   config.js10096.551001004
   profiles.js94.7395.6594.7395.4138, 172–174
   sources.js62.9954.767562.6936, 64, 93, 143, 147, 150, 173, 219–229, 238–252, 260–270, 279–293
   tools.js56.2534.1466.6656.885–86, 123–130, 157–161, 168–171, 194–203, 228–235, 252, 266, 282, 294–349
   userData.js99.2398.2710099.22195
   users.js95.8697.059596.58243–244, 263–264
   utils.js10088.8810010016, 42

@a-lubert a-lubert force-pushed the feat/manage-userdata-files branch from 01e8bc8 to 0b29813 Compare March 6, 2025 10:13
a-lubert added 2 commits March 6, 2025 11:33
This column was previously used to store JSON content, but the size of this data
can be big, so the solution is to move this data on the file system instead.

The migration will create the storage directory, move the content in dedicated
files, write the filename path in the data_path column for each entries and
remove the data_content column.
The file will be stored under the “data/user_data” directory and can be
retrieved with the userDataModel.file function.
@a-lubert a-lubert force-pushed the feat/manage-userdata-files branch from 0b29813 to cc6f787 Compare March 6, 2025 10:34
@djangoliv
Copy link
Collaborator

Je suis pour merger cette MR, et remettre le data_content dans une autre MR.

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

Successfully merging this pull request may close these issues.

2 participants