Fix:Ignore dot files in migrations folder #3510

This commit is contained in:
advplyr 2024-10-14 14:46:55 -05:00
parent a7288b4fbf
commit 13dd4edd6a

View File

@ -130,7 +130,7 @@ class MigrationManager {
async initUmzug(umzugStorage = new SequelizeStorage({ sequelize: this.sequelize })) { async initUmzug(umzugStorage = new SequelizeStorage({ sequelize: this.sequelize })) {
// This check is for dependency injection in tests // This check is for dependency injection in tests
const files = (await fs.readdir(this.migrationsDir)).map((file) => path.join(this.migrationsDir, file)) const files = (await fs.readdir(this.migrationsDir)).filter((file) => !file.startsWith('.')).map((file) => path.join(this.migrationsDir, file))
const parent = new Umzug({ const parent = new Umzug({
migrations: { migrations: {