1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-14 18:27:44 +02:00

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

This commit is contained in:
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

View File

@ -338,7 +338,7 @@ export function isUniqueConstraintError(error: any): boolean {
export async function latestMigration(db: DbConnection): Promise<any> {
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