Files
speckle-server/packages/server/modules/cli/commands/db/migrate/latest.ts
T
2024-10-25 11:05:43 +03:00

16 lines
396 B
TypeScript

import knex from '@/db/knex'
import { logger } from '@/logging/logging'
import { CommandModule } from 'yargs'
const command: CommandModule = {
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')
}
}
export = command