Skip to content
Snippets Groups Projects
Commit ba25b035 authored by Jure's avatar Jure
Browse files

Merge branch 'fix-migrate-command' into 'master'

fix(cli): update migration teardown to use knex instead of pg

See merge request pubsweet/pubsweet!427
parents ee207249 8cc2a3e1
No related branches found
No related tags found
No related merge requests found
const program = require('commander') const program = require('commander')
const db = require('pubsweet-server/src/db') const { db } = require('pubsweet-server')
const { migrate } = require('@pubsweet/db-manager') const { migrate } = require('@pubsweet/db-manager')
module.exports = async (commandArguments = process.argv) => { module.exports = async (commandArguments = process.argv) => {
...@@ -7,5 +7,5 @@ module.exports = async (commandArguments = process.argv) => { ...@@ -7,5 +7,5 @@ module.exports = async (commandArguments = process.argv) => {
await migrate(options) await migrate(options)
// drain pool to avoid 10 second delay before command exits // drain pool to avoid 10 second delay before command exits
db.end() await db.destroy()
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment