-
-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: merge the products and product images directories for OFF, …
…OBF, OPF and OPFF (#10959) In the last few weeks, we normalized product barcodes and deduplicated products that existed in multiple flavors (Open Food Facts, Open Beauty Facts, Open Product Facts and Open Pet Food Facts). We are now going to merge the directories that contain product and product revision data (the .sto files) and the product images. We will keep separate MongoDB databases for each flavor. This will: - make it much easier to move products from one product type to another - remove the possibility of having duplicate products on multiple flavors - make it much easier to have read and write APIs that can be used to retrieve / update products of any type. Deployment plan: - stop OBF, OPF, OPFF for the duration of the migration (a couple of hours) - update OFF code - move products and product images dirs from OBF, OPF, OPFF to the OFF directory structure - change the links to products and products of images on OBF, OPF, OPFF to use the OFF dirs - restart OBF, OPF, OPFF with the new code In this PR: - code updates to check product_type when reading / editing a product for both the website and API. Redirect to the right flavor if the product type is different than the one of the server the request was made to. - changed the product edit form to allow moderators to change the product_type - keep support for moderators to put "obf" etc. in the change code field - tests for the above - small refactor to put into Config.pm things that are the same for all flavors and that are currently duplicated in Config_off.pm etc. Will solve: - #9221 - #7539 - #1174 - #497 - #320
- Loading branch information
1 parent
bbf092f
commit c22734b
Showing
66 changed files
with
3,021 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.