From 741208911ba5de0c9a729c09a7bee6ab69b27bc3 Mon Sep 17 00:00:00 2001 From: gh0stalker Date: Sat, 7 Mar 2020 16:56:21 -0600 Subject: [PATCH] fix: postgres 2.2.17 migration missing quotes (#1562) --- server/db/migrations/2.2.17.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/db/migrations/2.2.17.js b/server/db/migrations/2.2.17.js index d9702e8b..f7461288 100644 --- a/server/db/migrations/2.2.17.js +++ b/server/db/migrations/2.2.17.js @@ -5,7 +5,7 @@ exports.up = knex => { switch (WIKI.config.db.type) { case 'postgres': case 'mssql': - sqlVersionDate = 'UPDATE "pageHistory" h1 SET "versionDate" = COALESCE((SELECT prev."createdAt" FROM "pageHistory" prev WHERE prev."pageId" = h1."pageId" AND prev.id < h1.id ORDER BY prev.id DESC LIMIT 1), h1.createdAt)' + sqlVersionDate = 'UPDATE "pageHistory" h1 SET "versionDate" = COALESCE((SELECT prev."createdAt" FROM "pageHistory" prev WHERE prev."pageId" = h1."pageId" AND prev.id < h1.id ORDER BY prev.id DESC LIMIT 1), h1."createdAt")' break case 'mysql': case 'mariadb':