From c7b011150152e62a35f3f8ab04d6dde6d6727583 Mon Sep 17 00:00:00 2001 From: David Luecke Date: Wed, 29 May 2024 20:57:26 -0600 Subject: [PATCH] fix(generators): Fix migrate:make script in generated app (#3490) --- packages/generators/src/connection/templates/knex.tpl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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' } }),