reworked the application to expect MigrationStorage getFirst and getLast Migration functions to return single documents rather than arrays