From dcad9d1b7d27df14217822c2606657f0df85cb33 Mon Sep 17 00:00:00 2001 From: Jason Claxton <30830544+Jozzey@users.noreply.github.com> Date: Mon, 20 Nov 2023 15:16:14 +0000 Subject: [PATCH] Rename `package.json` migration scripts (#532) https://github.com/DEFRA/water-abstraction-team/issues/106 To deploy this using our existing scripts we have to be able to call `npm run migrate`. If we kept the naming convention we would have to rewrite our deployment scripts, so it is easier if we just rename our scripts in here. --- .github/workflows/ci.yml | 2 +- package.json | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4632b1b2f4..c5f4e9ee1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,7 @@ jobs: - name: Database migrations run: | - npm run db:migrate:test + npm run migrate:test # This includes an extra run step. The sonarcloud analysis will be run in a docker container with the current # folder mounted as `/github/workspace`. The problem is when the lcov.info file is generated it will reference the diff --git a/package.json b/package.json index c15ae858df..d5e70802ec 100644 --- a/package.json +++ b/package.json @@ -7,13 +7,13 @@ "scripts": { "start": "node index.js", "build": "bin/build", - "db:migrate:make": "knex migrate:make --", - "db:migrate:make:test": "NODE_ENV=test knex migrate:make --migrations-directory db/migrations/legacy --", - "db:migrate": "knex migrate:latest", - "db:migrate:test": "NODE_ENV=test knex migrate:latest", - "db:rollback": "knex migrate:rollback --all", - "db:rollback:test": "NODE_ENV=test knex migrate:rollback --all", - "db:seed": "knex seed:run --knexfile knexfile.application.js", + "migrate:make": "knex migrate:make --", + "migrate:make:test": "NODE_ENV=test knex migrate:make --migrations-directory db/migrations/legacy --", + "migrate": "knex migrate:latest", + "migrate:test": "NODE_ENV=test knex migrate:latest", + "rollback": "knex migrate:rollback --all", + "rollback:test": "NODE_ENV=test knex migrate:rollback --all", + "seed": "knex seed:run --knexfile knexfile.application.js", "lint": "standard", "test": "lab --silent-skips --shuffle", "postinstall": "npm run build",