Homec4science

Add an iterator to make it easier to perform database migrations

Authored by epriestley <git@epriestley.com> on Jul 19 2012, 05:01.

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

Committed
epriestley <git@epriestley.com>Jul 19 2012, 05:01
Pushed
aubortJan 31 2017, 17:16
Parents
rPH6e63674b2da1: Use class_exists() before is_subclass_of()
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHa7bcc532dadf: Add an iterator to make it easier to perform database migrations (authored by epriestley <git@epriestley.com>).Jul 19 2012, 05:01