From 8cc2a3e1af2dda840a2d053b26a2ff3258ff381f Mon Sep 17 00:00:00 2001 From: Tamlyn Rhodes <tamlyn@tamlyn.org> Date: Tue, 2 Oct 2018 15:12:57 +0100 Subject: [PATCH] fix(cli): update migration teardown to use knex instead of pg --- packages/cli/cli/migrate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/cli/migrate.js b/packages/cli/cli/migrate.js index 201fdc7ef..dfdd31a43 100644 --- a/packages/cli/cli/migrate.js +++ b/packages/cli/cli/migrate.js @@ -1,5 +1,5 @@ const program = require('commander') -const db = require('pubsweet-server/src/db') +const { db } = require('pubsweet-server') const { migrate } = require('@pubsweet/db-manager') module.exports = async (commandArguments = process.argv) => { @@ -7,5 +7,5 @@ module.exports = async (commandArguments = process.argv) => { await migrate(options) // drain pool to avoid 10 second delay before command exits - db.end() + await db.destroy() } -- GitLab