This only affects some 25K messages; should be no trouble performance-wise to do it in one SQL query à la...
{{{
UPDATE TranslationMessage
SET potemplate = NULL
FROM POTemplate
WHERE
POTemplate.path LIKE '%.xpi' AND
language = 119
}}}
Doing so currently violates no unique constraints either, but it may cause duplications that we don't currently check for.
We do seem to have some 70K "en" TranslationMessages in the database that are not from XPI templates. We should probably delete those.
This only affects some 25K messages; should be no trouble performance-wise to do it in one SQL query à la...
{{{
UPDATE TranslationMessage
SET potemplate = NULL
FROM POTemplate
WHERE
POTemplate.path LIKE '%.xpi' AND
language = 119
}}}
Doing so currently violates no unique constraints either, but it may cause duplications that we don't currently check for.
We do seem to have some 70K "en" TranslationMessages in the database that are not from XPI templates. We should probably delete those.