HomePhorge

Add an iterator to make it easier to perform database migrations

Description

Add an iterator to make it easier to perform database migrations

Summary: See D3006, D3007. Make it easier to do migrations like that without holding all results in memory.

Test Plan:
Ran this code with an artificially small page size (2):

foreach (new LiskMigrationIterator(new DifferentialRevision()) as $rev) {
  echo "Revision ".$rev->getID()."\n";
}

Verified each revision as loaded and processed.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1162

Differential Revision: https://secure.phabricator.com/D3008

Details

Provenance
epriestleyAuthored on Jul 18 2012, 8:01 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rP6e63674b2da1: Use class_exists() before is_subclass_of()
Branches
Unknown
Tags
Unknown

Event Timeline