Change-Id: I3314264616066e3c645b1496a11f68a11fc189d5
public function __construct() {
parent::__construct();
$this->mDescription = "Populate the *_from_namespace fields";
public function __construct() {
parent::__construct();
$this->mDescription = "Populate the *_from_namespace fields";
+ $this->addOption( 'lastUpdatedId', "Highest page_id with updated links", false, true );
}
protected function getUpdateKey() {
}
protected function getUpdateKey() {
$this->output( "Updating *_from_namespace fields in links tables.\n" );
$this->output( "Updating *_from_namespace fields in links tables.\n" );
- $start = $db->selectField( 'page', 'MIN(page_id)', false, __METHOD__ );
+ $start = $this->getOption( 'lastUpdatedId' );
+ if ( !$start ) {
+ $start = $db->selectField( 'page', 'MIN(page_id)', false, __METHOD__ );
+ }
if ( !$start ) {
$this->output( "Nothing to do." );
return false;
if ( !$start ) {
$this->output( "Nothing to do." );
return false;