Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #24 from ogbofjnr/fix-v1-migrations-sorting
Browse files Browse the repository at this point in the history
add sorting
  • Loading branch information
wolfy-j authored Feb 1, 2021
2 parents f53dcae + 59e6bf7 commit 509680e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/Spiral/Migrations/Migrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ public function getMigrations(): array
$result[] = $migration->withState($this->resolveStatus($migration->getState()));
}

usort($result, function ($a, $b) {
return $a->getState()->getTimeCreated() <=> $b->getState()->getTimeCreated();
});


return $result;
}

Expand Down

0 comments on commit 509680e

Please sign in to comment.