@rws-framework/db 2.4.3 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,8 +83,7 @@ class DbHelper {
83
83
  }
84
84
  static async pushDBModels(configService, dbService, leaveFile = false) {
85
85
  process.env = { ...process.env, [this.dbUrlVarName]: configService.get('db_url') };
86
- const schemaDir = path_1.default.join(moduleDir, 'prisma');
87
- const schemaPath = path_1.default.join(schemaDir, 'schema.prisma');
86
+ const schemaPath = path_1.default.join(workspaceRoot, 'node_modules', '.prisma', 'schema.prisma');
88
87
  await console_1.rwsShell.runCommand(`${this.detectInstaller()} prisma db push --schema="${schemaPath}"`, process.cwd());
89
88
  }
90
89
  static async generateModelSections(model, configService) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/db",
3
3
  "private": false,
4
- "version": "2.4.3",
4
+ "version": "2.4.4",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -119,8 +119,8 @@ export class DbHelper {
119
119
 
120
120
  static async pushDBModels(configService: IDbConfigHandler, dbService: DBService, leaveFile = false){
121
121
  process.env = { ...process.env, [this.dbUrlVarName]: configService.get('db_url') }
122
- const schemaDir = path.join(moduleDir, 'prisma');
123
- const schemaPath = path.join(schemaDir, 'schema.prisma');
122
+
123
+ const schemaPath = path.join(workspaceRoot, 'node_modules', '.prisma', 'schema.prisma');
124
124
 
125
125
  await rwsShell.runCommand(`${this.detectInstaller()} prisma db push --schema="${schemaPath}"`, process.cwd());
126
126