Server: Fixed display of latest migration in startup log (#5627)

pull/5629/head
Piotr Kowalski 2021-10-25 13:31:01 +02:00 committed by GitHub
parent 17cf9b3272
commit 1a90ad326f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -338,7 +338,7 @@ export function isUniqueConstraintError(error: any): boolean {
export async function latestMigration(db: DbConnection): Promise<any> { export async function latestMigration(db: DbConnection): Promise<any> {
try { 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; return result;
} catch (error) { } catch (error) {
// If the database has never been initialized, we return null, so // If the database has never been initialized, we return null, so