{
try {
SqlScriptsResource res = new SqlDirResource(scriptsDir);
if (versionSql != null && !versionSql.isEmpty()) {
res = new DbVersionFilter(res, account.getConnection(), versionSql, stepPattern);
}
if (templateContext != null) {
res = new VelocityDecoratorResource(res, templateContext);
}