feat: 实现数据库配置和模板迁移系统

- 配置MySQL数据库连接和TypeORM集成
- 创建N8nTemplate实体和动态实例实体
- 实现混合架构:代码逻辑+数据库配置
- 添加模板工厂服务和迁移服务
- 创建RESTful API控制器用于模板管理
- 将所有n8nTemplates模板整理为独立migration文件
- 添加完整的数据库迁移指南和使用文档
- 更新app.module.ts集成新服务和配置
This commit is contained in:
imeepos
2025-09-04 15:20:33 +08:00
parent ef90c7c71d
commit f83859b518
32 changed files with 3079 additions and 3058 deletions

View File

@@ -18,15 +18,26 @@
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
"test:e2e": "jest --config ./test/jest-e2e.json",
"typecheck": "tsc --noEmit",
"typeorm": "typeorm-ts-node-commonjs",
"migration:generate": "npm run typeorm -- migration:generate",
"migration:run": "npm run typeorm -- migration:run",
"migration:revert": "npm run typeorm -- migration:revert",
"schema:sync": "npm run typeorm -- schema:sync",
"schema:drop": "npm run typeorm -- schema:drop"
},
"dependencies": {
"@nestjs/common": "^11.0.1",
"@nestjs/config": "^4.0.2",
"@nestjs/core": "^11.0.1",
"@nestjs/platform-express": "^11.0.1",
"@nestjs/typeorm": "^11.0.0",
"axios": "^1.11.0",
"mysql2": "^3.9.7",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1"
"rxjs": "^7.8.1",
"typeorm": "^0.3.20"
},
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",