Only use files with the correct extension for migrations

This commit is contained in:
Les Orchard 2013-12-12 08:59:35 -05:00
parent 7e4913bd32
commit f2dd5f8305
2 changed files with 5 additions and 1 deletions

View File

@ -129,7 +129,10 @@ Migrate.prototype = {
return Promise.promisify(fs.readdir, fs)(this.config.directory);
})
.then(function(migrations) {
return migrations.sort();
var ext = this.config.extension;
return _.filter(migrations, function (value) {
return value.indexOf(ext, value.length - ext.length) !== -1;
}).sort();
});
},

View File

@ -0,0 +1 @@
This is definitely not a migration.