Skip to content

Commit

Permalink
BC-5962 - fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
virgilchiriac committed Jan 5, 2024
1 parent 9eb2137 commit eadee51
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ 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
- name: check migrations in database exist in filesystem
run: npm run migration-prune
run: npm run migration:list
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ spec:
name: api-configmap
- secretRef:
name: api-secret
command: ['/bin/sh','-c']vi
args: ['npm run ensureIndexes && npm run migration up']
command: ['/bin/sh','-c']
args: ['npm run ensureIndexes && npm run migration:up']
resources:
limits:
cpu: {{ API_CPU_LIMITS|default("2000m", true) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class DatabaseManagementConsole {
options: [
{
flags: '--up',
required: true,
required: false,
description: 'execute migration up',
},
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit eadee51

Please sign in to comment.