fix: defineMikroOrmCliConfig helper to provide default db credentials (#8131)

This commit is contained in:
Harminder Virk
2024-07-15 15:49:00 +05:30
committed by GitHub
parent 1bd1d4f394
commit 5bb870948a
2 changed files with 9 additions and 0 deletions

View File

@@ -20,6 +20,9 @@ describe("defineMikroOrmCliConfig", () => {
expect(config).toEqual({
entities: [{}],
type: "postgresql",
host: "127.0.0.1",
user: "postgres",
password: "",
dbName: "medusa-fulfillment",
migrations: {
generator: expect.any(Function),
@@ -36,6 +39,9 @@ describe("defineMikroOrmCliConfig", () => {
entities: [{}],
type: "postgresql",
dbName: "medusa-my-test",
host: "127.0.0.1",
user: "postgres",
password: "",
migrations: {
generator: expect.any(Function),
},

View File

@@ -56,6 +56,9 @@ export function defineMikroOrmCliConfig(
return {
type: "postgresql",
dbName: databaseName,
host: "127.0.0.1",
user: "postgres",
password: "",
...options,
entities,
migrations: {