Merge pull request #4767 from toeverything/61/fix/data-migration
fix(server): wrong prod data migration scripts filter
This commit is contained in:
@@ -18,7 +18,9 @@ async function collectMigrations(): Promise<Migration[]> {
|
|||||||
const folder = join(fileURLToPath(import.meta.url), '../../migrations');
|
const folder = join(fileURLToPath(import.meta.url), '../../migrations');
|
||||||
|
|
||||||
const migrationFiles = readdirSync(folder)
|
const migrationFiles = readdirSync(folder)
|
||||||
.filter(desc => desc.endsWith('.ts') && desc !== 'index.ts')
|
.filter(desc =>
|
||||||
|
desc.endsWith(import.meta.url.endsWith('.ts') ? '.ts' : '.js')
|
||||||
|
)
|
||||||
.map(desc => join(folder, desc));
|
.map(desc => join(folder, desc));
|
||||||
|
|
||||||
const migrations: Migration[] = await Promise.all(
|
const migrations: Migration[] = await Promise.all(
|
||||||
|
|||||||
Reference in New Issue
Block a user