@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.
package/dist/helper/DbHelper.js
CHANGED
|
@@ -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
|
|
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
package/src/helper/DbHelper.ts
CHANGED
|
@@ -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
|
-
|
|
123
|
-
const schemaPath = path.join(
|
|
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
|
|