Merge "The script can be re-run (in some cases at least!) to fix up incomplete migrat...
authorBrion VIBBER <brion@wikimedia.org>
Thu, 26 Apr 2012 23:38:15 +0000 (23:38 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 Apr 2012 23:38:16 +0000 (23:38 +0000)
maintenance/populateParentId.php

index 14f158c..b6d2067 100644 (file)
@@ -61,7 +61,7 @@ class PopulateParentId extends LoggedUpdateMaintenance {
                        $cond = "rev_id BETWEEN $blockStart AND $blockEnd";
                        $res = $db->select( 'revision',
                                array( 'rev_id', 'rev_page', 'rev_timestamp', 'rev_parent_id' ),
-                               $cond, __METHOD__ );
+                               array( $cond, 'rev_parent_id' => null ), __METHOD__ );
                        # Go through and update rev_parent_id from these rows.
                        # Assume that the previous revision of the title was
                        # the original previous revision of the title when the