File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
packages/medusa/src/commands/plugin/db Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ async function generateMigrations(
98
98
entities : any [ ]
99
99
} [ ] = [ ]
100
100
) {
101
+ const DB_HOST = process . env . DB_HOST ?? "localhost"
102
+ const DB_USERNAME = process . env . DB_USERNAME ?? ""
103
+ const DB_PASSWORD = process . env . DB_PASSWORD ?? ""
104
+
101
105
for ( const moduleDescriptor of moduleDescriptors ) {
102
106
logger . info (
103
107
`Generating migrations for module ${ moduleDescriptor . serviceName } ...`
@@ -107,6 +111,9 @@ async function generateMigrations(
107
111
moduleDescriptor . serviceName ,
108
112
{
109
113
entities : moduleDescriptor . entities ,
114
+ host : DB_HOST ,
115
+ user : DB_USERNAME ,
116
+ password : DB_PASSWORD ,
110
117
migrations : {
111
118
path : moduleDescriptor . migrationsPath ,
112
119
} ,
You can’t perform that action at this time.
0 commit comments