mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix: migration efficiency (#4359)
* fix: migration efficiency * fix: workflow
This commit is contained in:
parent
ebd3f7f125
commit
fc93762230
2 changed files with 22 additions and 10 deletions
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
|
@ -223,15 +223,27 @@ jobs:
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./server
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install server dependencies
|
- name: Install server dependencies
|
||||||
run: npm --prefix server ci
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build the
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
- name: Run existing migrations
|
- name: Run existing migrations
|
||||||
run: npm --prefix server run typeorm:migrations:run
|
run: npm run typeorm:migrations:run
|
||||||
|
|
||||||
- name: Generate new migrations
|
- name: Generate new migrations
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: npm --prefix server run typeorm:migrations:generate ./src/infra/migrations/TestMigration
|
run: npm run typeorm:migrations:generate ./src/infra/migrations/TestMigration
|
||||||
|
|
||||||
- name: Find file changes
|
- name: Find file changes
|
||||||
uses: tj-actions/verify-changed-files@v13.1
|
uses: tj-actions/verify-changed-files@v13.1
|
||||||
id: verify-changed-files
|
id: verify-changed-files
|
||||||
|
|
|
@ -27,12 +27,12 @@
|
||||||
"test:cov": "jest --coverage",
|
"test:cov": "jest --coverage",
|
||||||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
||||||
"test:e2e": "jest --config test/e2e/jest-e2e.json --runInBand",
|
"test:e2e": "jest --config test/e2e/jest-e2e.json --runInBand",
|
||||||
"typeorm": "node --require ts-node/register ./node_modules/typeorm/cli.js",
|
"typeorm": "typeorm",
|
||||||
"typeorm:migrations:create": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:create",
|
"typeorm:migrations:create": "typeorm migration:create",
|
||||||
"typeorm:migrations:generate": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:generate -d ./src/infra/database.config.ts",
|
"typeorm:migrations:generate": "typeorm migration:generate -d ./dist/infra/database.config.js",
|
||||||
"typeorm:migrations:run": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:run -d ./src/infra/database.config.ts",
|
"typeorm:migrations:run": "typeorm migration:run -d ./dist/infra/database.config.js",
|
||||||
"typeorm:migrations:revert": "node --require ts-node/register ./node_modules/typeorm/cli.js migration:revert -d ./src/infra/database.config.ts",
|
"typeorm:migrations:revert": "typeorm migration:revert -d ./dist/infra/database.config.js",
|
||||||
"typeorm:schema:drop": "node --require ts-node/register ./node_modules/typeorm/cli.js schema:drop -d ./src/infra/database.config.ts",
|
"typeorm:schema:drop": "typeorm schema:drop -d ./dist/infra/database.config.js",
|
||||||
"typeorm:schema:reset": "npm run typeorm:schema:drop && npm run typeorm:migrations:run",
|
"typeorm:schema:reset": "npm run typeorm:schema:drop && npm run typeorm:migrations:run",
|
||||||
"api:typescript": "bash ./bin/generate-open-api.sh web",
|
"api:typescript": "bash ./bin/generate-open-api.sh web",
|
||||||
"api:dart": "bash ./bin/generate-open-api.sh mobile",
|
"api:dart": "bash ./bin/generate-open-api.sh mobile",
|
||||||
|
|
Loading…
Reference in a new issue