Closed
Bug 1599377
Opened 6 years ago
Closed 4 years ago
Mark translations as "deleted" instead of actually removing them
Categories
(Webtools Graveyard :: Pontoon, enhancement, P3)
Webtools Graveyard
Pontoon
Tracking
(Not tracked)
RESOLVED
MOVED
People
(Reporter: adrian, Unassigned)
Details
At the moment, when we want to hide a translation from the UI and API, we delete it from the database. Because we still need to know that something changed on the associated entity, project and locale, we created the ChangedEntityLocale
table.
If, instead of deleting the entry, we marked it as deleted
, we could do without that table. It would also simplify some of our existing relationships, and would avoid the loss of some data due to links with the translation table.
Doing this however means we will need to rework our queries to the Translation table to exclude deleted translations.
I don't think the quantity of data that this will add will be worrisome but we should still keep that in mind and monitor the size of our table.
Steps
- Add a
deleted
boolean field to the Translation model. - Replace all queries to the Translation table to exclude
deleted=True
. Add tests to verify that behavior. - Update the
delete_translation
method to mark as deleted. - Update ActionLog's
translation:deleted
action to link to the translation instead of entity/locale couple. - Update code that uses the
ChangedEntityLocale
table to rely on the Translation table instead. - Remove the
ChangedEntityLocale
table.
Comment 1•4 years ago
|
||
*This bug has been moved to GitHub.*
*Please check it out on https://github.com/mozilla/pontoon/issues.*
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → MOVED
Updated•4 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•