migrate(scheduleIds, find1HourData, Bucket.ONE_HOUR);
migrate(scheduleIds, find6HourData, Bucket.SIX_HOUR);
migrate(scheduleIds, find24HourData, Bucket.TWENTY_FOUR_HOUR);
stopwatch.stop();
log.info("Finished aggregate metrics migration in " + stopwatch.elapsed(TimeUnit.SECONDS) + " seconds");
if (failedMigrations.get() > 0) {
throw new RuntimeException("There were " + failedMigrations.get() + " failed migrations. The " +
"upgrade will have to be run again to complete the migration.");
}