fix(backend): تشغيل الهجرات على dist المترجَم بدل ts-node في صورة الإنتاج
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,9 @@ docker compose up -d --build # يبني ويشغّل: postgres/postgis, redis,
|
|||||||
```bash
|
```bash
|
||||||
docker compose exec api npm run migration:run
|
docker compose exec api npm run migration:run
|
||||||
```
|
```
|
||||||
|
> الهجرات تعمل على النسخة المترجمة `dist/config/data-source.js` (صورة الإنتاج بلا ts-node).
|
||||||
|
> لو ما رفعت آخر نسخة بعد، شغّل مباشرة:
|
||||||
|
> `docker compose exec api node_modules/.bin/typeorm migration:run -d dist/config/data-source.js`
|
||||||
|
|
||||||
## فحص سريع
|
## فحص سريع
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -9,10 +9,11 @@
|
|||||||
"start:dev": "nest start --watch",
|
"start:dev": "nest start --watch",
|
||||||
"start:prod": "node dist/main.js",
|
"start:prod": "node dist/main.js",
|
||||||
"worker": "node dist/worker.js",
|
"worker": "node dist/worker.js",
|
||||||
"typeorm": "typeorm-ts-node-commonjs -d src/config/data-source.ts",
|
"typeorm": "typeorm -d dist/config/data-source.js",
|
||||||
"migration:generate": "npm run typeorm -- migration:generate",
|
"typeorm:dev": "typeorm-ts-node-commonjs -d src/config/data-source.ts",
|
||||||
"migration:run": "npm run typeorm -- migration:run",
|
"migration:run": "npm run typeorm -- migration:run",
|
||||||
"migration:revert": "npm run typeorm -- migration:revert",
|
"migration:revert": "npm run typeorm -- migration:revert",
|
||||||
|
"migration:generate": "npm run typeorm:dev -- migration:generate",
|
||||||
"lint": "eslint \"src/**/*.ts\" --fix",
|
"lint": "eslint \"src/**/*.ts\" --fix",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user