mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 03:26:47 +08:00
fix(server): ensure selfhost admin created after all data migrated (#6163)
fix #6154 cp to canary
This commit is contained in:
@@ -23,6 +23,8 @@ export async function collectMigrations(): Promise<Migration[]> {
|
|||||||
)
|
)
|
||||||
.map(desc => join(folder, desc));
|
.map(desc => join(folder, desc));
|
||||||
|
|
||||||
|
migrationFiles.sort((a, b) => a.localeCompare(b));
|
||||||
|
|
||||||
const migrations: Migration[] = await Promise.all(
|
const migrations: Migration[] = await Promise.all(
|
||||||
migrationFiles.map(async file => {
|
migrationFiles.map(async file => {
|
||||||
return import(pathToFileURL(file).href).then(mod => {
|
return import(pathToFileURL(file).href).then(mod => {
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import { PrismaClient } from '@prisma/client';
|
|||||||
import { UserService } from '../../core/user';
|
import { UserService } from '../../core/user';
|
||||||
import { Config, CryptoHelper } from '../../fundamentals';
|
import { Config, CryptoHelper } from '../../fundamentals';
|
||||||
|
|
||||||
export class SelfHostAdmin1605053000403 {
|
export class SelfHostAdmin99999999 {
|
||||||
// do the migration
|
// do the migration
|
||||||
static async up(_db: PrismaClient, ref: ModuleRef) {
|
static async up(_db: PrismaClient, ref: ModuleRef) {
|
||||||
const config = ref.get(Config, { strict: false });
|
const config = ref.get(Config, { strict: false });
|
||||||
Reference in New Issue
Block a user