Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(server): wrong prod data migration scripts filter

forehalo26b953ce57b4
diff --git a/packages/backend/server/src/data/commands/run.ts b/packages/backend/server/src/data/commands/run.ts
index 5e8dd5a957..f9618ab08e 100644
--- a/packages/backend/server/src/data/commands/run.ts
+++ b/packages/backend/server/src/data/commands/run.ts
@@ -18,7 +18,9 @@ async function collectMigrations(): Promise<Migration[]> {
const folder = join(fileURLToPath(import.meta.url), '../../migrations');
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));
const migrations: Migration[] = await Promise.all(