diff --git a/packages/generators/src/connection/templates/knex.tpl.ts b/packages/generators/src/connection/templates/knex.tpl.ts index 96ff13a18a..afa6ef6d79 100644 --- a/packages/generators/src/connection/templates/knex.tpl.ts +++ b/packages/generators/src/connection/templates/knex.tpl.ts @@ -58,7 +58,7 @@ export const generate = (ctx: ConnectionGeneratorContext) => (ctx) => ({ scripts: { migrate: 'knex migrate:latest', - 'migrate:make': 'knex migrate:make' + ctx.language === 'js' ? ' -x mjs' : '', + 'migrate:make': 'knex migrate:make' + (ctx.language === 'js' ? ' -x mjs' : ''), test: 'cross-env NODE_ENV=test npm run migrate && npm run mocha' } }),