Skip to content

Commit c828e33

Browse files
authored
fix: excludes index files from migration files filtering (#10722)
1 parent 90d3c65 commit c828e33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/payload/src/database/migrations/readMigrationFiles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const readMigrationFiles = async ({
2929
.readdirSync(payload.db.migrationDir)
3030
.sort()
3131
.filter((f) => {
32-
return (f.endsWith('.ts') || f.endsWith('.js')) && !f.includes('index.')
32+
return (f.endsWith('.ts') || f.endsWith('.js')) && f !== 'index.js' && f !== 'index.ts'
3333
})
3434
.map((file) => {
3535
return path.resolve(payload.db.migrationDir, file)

0 commit comments

Comments
 (0)