mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Fix incorrect order of migrations when reverting (#12130)
This commit is contained in:
@@ -74,7 +74,7 @@ export default async function run(database: Knex, direction: 'up' | 'down' | 'la
|
||||
}
|
||||
|
||||
async function down() {
|
||||
const lastAppliedMigration = orderBy(completedMigrations, ['timestamp'], ['desc'])[0];
|
||||
const lastAppliedMigration = orderBy(completedMigrations, ['timestamp', 'version'], ['desc', 'desc'])[0];
|
||||
|
||||
if (!lastAppliedMigration) {
|
||||
throw Error('Nothing to downgrade');
|
||||
|
||||
Reference in New Issue
Block a user