diff --git a/apps/backend/package.json b/apps/backend/package.json index 62bc38f..80aa17d 100644 --- a/apps/backend/package.json +++ b/apps/backend/package.json @@ -13,9 +13,12 @@ "test:unit": "echo 'Vitest setup pending'", "test:e2e": "echo 'E2E tests setup pending'", "migration:new": "set NODE_OPTIONS=--import tsx/esm && knex migrate:make --knexfile src/db/knexfile.ts", - "migration:latest": "set NODE_OPTIONS=--import tsx/esm && knex migrate:latest --knexfile src/db/knexfile.ts", - "migration:rollback": "set NODE_OPTIONS=--import tsx/esm && knex migrate:rollback --knexfile src/db/knexfile.ts", - "migration:status": "set NODE_OPTIONS=--import tsx/esm && knex migrate:status --knexfile src/db/knexfile.ts", + "migration:latest": "NODE_ENV=${NODE_ENV:-production} knex migrate:latest --knexfile dist/db/knexfile.js", + "migration:rollback": "NODE_ENV=${NODE_ENV:-production} knex migrate:rollback --knexfile dist/db/knexfile.js", + "migration:status": "NODE_ENV=${NODE_ENV:-production} knex migrate:status --knexfile dist/db/knexfile.js", + "migration:latest:dev": "set NODE_OPTIONS=--import tsx/esm && knex migrate:latest --knexfile src/db/knexfile.ts", + "migration:rollback:dev": "set NODE_OPTIONS=--import tsx/esm && knex migrate:rollback --knexfile src/db/knexfile.ts", + "migration:status:dev": "set NODE_OPTIONS=--import tsx/esm && knex migrate:status --knexfile src/db/knexfile.ts", "generate:schema": "echo 'Schema generation setup pending'", "docs:open": "echo 'API Documentation available at http://localhost:3001/docs'", "db:seed": "knex seed:run",