Files
speckle-server/packages/server/modules/cli/commands/db/migrate/latest.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
406 B
JavaScript

const knex = require('@/db/knex')
const { logger } = require('@/logging/logging')
/** @type {import('yargs').CommandModule} */
const command = {
command: 'latest',
describe: 'Run all migrations that have not yet been run',
async handler() {
logger.info('Running latest migration...')
await knex.migrate.latest()
logger.info('Completed running migration')
}
}
module.exports = command