From 1a90ad326f5974dfc6e58716c8cb48c60c2eb0ef Mon Sep 17 00:00:00 2001 From: Piotr Kowalski Date: Mon, 25 Oct 2021 13:31:01 +0200 Subject: [PATCH] Server: Fixed display of latest migration in startup log (#5627) --- packages/server/src/db.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/db.ts b/packages/server/src/db.ts index dc02cba8fd0..644f4dbbf60 100644 --- a/packages/server/src/db.ts +++ b/packages/server/src/db.ts @@ -338,7 +338,7 @@ export function isUniqueConstraintError(error: any): boolean { export async function latestMigration(db: DbConnection): Promise { try { - const result = await db('knex_migrations').select('name').orderBy('id', 'asc').first(); + const result = await db('knex_migrations').select('name').orderBy('id', 'desc').first(); return result; } catch (error) { // If the database has never been initialized, we return null, so