diff --git a/.changeset/gentle-dancers-count.md b/.changeset/gentle-dancers-count.md new file mode 100644 index 0000000000000..aa70f11cab91d --- /dev/null +++ b/.changeset/gentle-dancers-count.md @@ -0,0 +1,5 @@ +--- +"@medusajs/medusa": patch +--- + +fix: do not update the .env.template file with the database name diff --git a/packages/medusa/src/commands/db/create.ts b/packages/medusa/src/commands/db/create.ts index d8aac928e806b..5dd2d6b48ad85 100644 --- a/packages/medusa/src/commands/db/create.ts +++ b/packages/medusa/src/commands/db/create.ts @@ -138,7 +138,7 @@ export async function dbCreate({ if (await dbExists(client, dbName)) { logger.info(`Database "${dbName}" already exists`) - envEditor.set("DB_NAME", dbName) + envEditor.set("DB_NAME", dbName, { withEmptyTemplateValue: true }) await envEditor.save() logger.info(`Updated .env file with "DB_NAME=${dbName}"`)