From 08cfd2210840c9c501bc84c21d18355bee4294e0 Mon Sep 17 00:00:00 2001 From: virgilchiriac Date: Fri, 5 Jan 2024 18:28:03 +0100 Subject: [PATCH] BC-5962 - fixes --- .github/workflows/migrations.yml | 4 ++-- Dockerfile | 1 - .../modules/management/console/database-management.console.ts | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml index 22aa7562e3c..64b54246b33 100644 --- a/.github/workflows/migrations.yml +++ b/.github/workflows/migrations.yml @@ -26,9 +26,9 @@ jobs: - run: npm run setup:db:seed - name: check migrations.json formatting run: | - npm run migration-persist + npm run migration:persisted git diff --exit-code backup/** - name: check filesystem migrations have been added to database - run: npm run migration-list + run: npm run migration:list - name: check migrations in database exist in filesystem run: npm run migration-prune diff --git a/Dockerfile b/Dockerfile index 77ed4a1088b..036bd9734d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,6 @@ COPY esbuild ./esbuild RUN npm ci && npm cache clean --force COPY config /schulcloud-server/config COPY backup /schulcloud-server/backup -COPY migrations /schulcloud-server/migrations COPY src /schulcloud-server/src COPY apps /schulcloud-server/apps COPY --from=git /app/serverversion /schulcloud-server/apps/server/static-assets diff --git a/apps/server/src/modules/management/console/database-management.console.ts b/apps/server/src/modules/management/console/database-management.console.ts index d0a22d8a846..383f8461a3c 100644 --- a/apps/server/src/modules/management/console/database-management.console.ts +++ b/apps/server/src/modules/management/console/database-management.console.ts @@ -89,7 +89,7 @@ export class DatabaseManagementConsole { options: [ { flags: '--up', - required: true, + required: false, description: 'execute migration up', }, { diff --git a/package.json b/package.json index 919a07cd420..fd240d8733f 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "mocha-metrics": "cross-env NODE_ENV=test mocha \"test/routes/*.metrics.js\" --exclude \"{test,src}/**/*.test.{js,ts}\" --no-timeout --exit", "migration:up": "npm run nest:start:console -- database migration --up", "migration:down": "npm run nest:start:console -- database migration --down", - "migration:list": "npx mikro-orm migration:list --config ./config/mikro-orm.config.ts", + "migration:list": "npx mikro-orm migration:list", "migration:persisted": "npm run nest:start:console -- database export --collection migrations --override", "nest:prebuild": "rimraf dist", "nest:build": "nest build",