From 8de2be7222743d28cf47e9ebc66ec3bf5a156fb3 Mon Sep 17 00:00:00 2001 From: Dan Harling Date: Wed, 28 Sep 2022 16:41:44 +0100 Subject: [PATCH] fix: implmement migrations sql ordering --- adapters/pg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/pg.js b/adapters/pg.js index 9229272..3f7d004 100644 --- a/adapters/pg.js +++ b/adapters/pg.js @@ -26,7 +26,7 @@ module.exports = function (config, logger) { return { appliedMigrations: function appliedMigrations() { return ensureMigrationTableExists().then(function () { - return exec('select * from __migrations__'); + return exec('select * from __migrations__ order by id asc'); }).then(function (result) { return result.rows.map(function (row) { return row.id; }); });