- Fix unique constraint by using -1 instead of NULL for res_id - Clean duplicate entries in po file
The unique constraint was not working when res_id was NULL because SQL consider all of them as different. The migration could fail if there is duplicate translation in the database. So this query must be run until no more records are deleted: DELETE FROM ir_translation WHERE id IN (SELECT MAX(id) FROM ir_translation GROUP BY name, res_id, lang, type, src_md5, module HAVING COUNT(1) > 1); issue3355 URL: http://codereview.tryton.org/1087004/
