Files
speckle-server/packages/server/modules/cli/commands/db/migrate/rollback.js
T
Iain Sproat 4d01e13a84 feat(structured logging) (#1242)
* Revert "Revert structured logging 2 (#1240)"
This reverts commit 78ecaeffcb.
* Logging should not be bundled into core shared directory
* making sure observability stuff isnt bundled into frontend


Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2022-12-06 11:51:18 +00:00

16 lines
404 B
JavaScript

const knex = require('@/db/knex')
const { logger } = require('@/logging/logging')
/** @type {import('yargs').CommandModule} */
const command = {
command: 'rollback',
describe: 'Roll back all migrations',
async handler() {
logger.info('Rolling back migrations...')
await knex.migrate.rollback(null, true)
logger.info('Completed rolling back migrations')
}
}
module.exports = command