← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/launchpad/bug-682933 into lp:launchpad/db-devel

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/launchpad/bug-682933 into lp:launchpad/db-devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers): code
Related bugs:
  #682933 Recife migration script unusably slow
  https://bugs.launchpad.net/bugs/682933


= Bug 682933 =

This fixes a problem with the migration to the "Recife" data model.  It works around Storm bug 682989, where the Reference class gets compiled to SQL that does not take ClassAliases into account.  This resulted in a seemingly correct query that nevertheless didn't do quite what we meant it to.

Kudos to Thomas Hervé, who came up with the simple workaround on very short notice.

{{{
./bin/test -vvc lp.translations -t migrate.current.flag
}}}


Jeroen
-- 
https://code.launchpad.net/~jtv/launchpad/bug-682933/+merge/42217
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/launchpad/bug-682933 into lp:launchpad/db-devel.
=== modified file 'lib/lp/translations/scripts/migrate_current_flag.py'
--- lib/lp/translations/scripts/migrate_current_flag.py	2010-11-26 23:28:27 +0000
+++ lib/lp/translations/scripts/migrate_current_flag.py	2010-11-30 09:06:44 +0000
@@ -71,8 +71,8 @@
                 PreviousImported.is_current_upstream == True,
                 (PreviousImported.potmsgsetID ==
                  CurrentTranslation.potmsgsetID),
-                Or(And(PreviousImported.potemplate == None,
-                       CurrentTranslation.potemplate == None),
+                Or(And(PreviousImported.potemplateID == None,
+                       CurrentTranslation.potemplateID == None),
                    (PreviousImported.potemplateID ==
                     CurrentTranslation.potemplateID)),
                 PreviousImported.languageID == CurrentTranslation.languageID,