Skip to content

Commit

Permalink
fix(server): ensure selfhost admin created after all data migrated (#…
Browse files Browse the repository at this point in the history
…6163)

fix #6154 

cp to canary
  • Loading branch information
forehalo committed Mar 18, 2024
1 parent d82ee7d commit 92d7f31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/backend/server/src/data/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export async function collectMigrations(): Promise<Migration[]> {
)
.map(desc => join(folder, desc));

migrationFiles.sort((a, b) => a.localeCompare(b));

const migrations: Migration[] = await Promise.all(
migrationFiles.map(async file => {
return import(pathToFileURL(file).href).then(mod => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { PrismaClient } from '@prisma/client';
import { UserService } from '../../core/user';
import { Config, CryptoHelper } from '../../fundamentals';

export class SelfHostAdmin1605053000403 {
export class SelfHostAdmin99999999 {
// do the migration
static async up(_db: PrismaClient, ref: ModuleRef) {
const config = ref.get(Config, { strict: false });
Expand Down

0 comments on commit 92d7f31

Please sign in to comment.