List<Change> migrations = getMigrations();
int steps = 0;
for (Change change : migrations) {
if (lastChange == null || change.getId().compareTo(lastChange.getId()) > 0) {
printStream.println(horizontalLine("Applying: " + change.getFilename(), 80));
ScriptRunner runner = getScriptRunner();
try {
runner.runScript(new MigrationReader(scriptFileReader(scriptFile(change.getFilename())), false, environmentProperties()));
} finally {
runner.closeConnection();
}
insertChangelog(change);
printStream.println();
steps++;
final int limit = getStepCountParameter(Integer.MAX_VALUE, params);