Repository: medusajs/medusa
File: packages/core/modules-sdk/src/medusa-app.ts (TypeScript)

Code before:
        moduleResolution.options.database = {
          ...(sharedResourcesConfig?.database ?? {}),
        }
        ;(moduleResolution as any).options.database.debug ??=
          sharedResourcesConfig?.database?.debug
      }

      const migrationOptions: MigrationOptions = {
        moduleKey: moduleResolution.definition.key,
        modulePath: moduleResolution.resolutionPath as string,
        container: sharedContainer,
        options: moduleResolution.options,
        moduleExports: moduleResolution.moduleExports as ModuleExports,
        cwd,
      }

      if (action === "revert") {
        await MedusaModule.migrateDown(migrationOptions)
      } else if (action === "run") {
        await MedusaModule.migrateUp(migrationOptions)
      } else {
        await MedusaModule.migrateGenerate(migrationOptions)
      }
    }

    const concurrency = parseInt(process.env.DB_MIGRATION_CONCURRENCY ?? "8")
    await executeWithConcurrency(
      moduleResolutions.map((a) => () => run(a)),
      concurrency
    )
  }

  const runMigrations: RunMigrationFn = async (): Promise<void> => {
    await applyMigration({
      modulesNames: Object.keys(allModules),
    })
  }

  const revertMigrations: RevertMigrationFn = async (
    modulesNames
  ): Promise<void> => {
    await applyMigration({
      modulesNames,
      action: "revert",
    })
  }

  const generateMigrations: GenerateMigrations = async (
    modulesNames
  ): Promise<void> => {
    await applyMigration({

Review comment (suggestion):
```suggestion
    const concurrency = parseInt(process.env.DB_MIGRATION_CONCURRENCY ?? "1")
```

Code after:
        moduleResolution.options.database = {
          ...(sharedResourcesConfig?.database ?? {}),
        }
        ;(moduleResolution as any).options.database.debug ??=
          sharedResourcesConfig?.database?.debug
      }

      const migrationOptions: MigrationOptions = {
        moduleKey: moduleResolution.definition.key,
        modulePath: moduleResolution.resolutionPath as string,
        container: sharedContainer,
        options: moduleResolution.options,
        moduleExports: moduleResolution.moduleExports as ModuleExports,
        cwd,
      }

      if (action === "revert") {
        await MedusaModule.migrateDown(migrationOptions)
      } else if (action === "run") {
        await MedusaModule.migrateUp(migrationOptions)
      } else {
        await MedusaModule.migrateGenerate(migrationOptions)
      }
    }

    const concurrency = parseInt(process.env.DB_MIGRATION_CONCURRENCY ?? "1")
    await executeWithConcurrency(
      moduleResolutions.map((a) => () => run(a)),
      concurrency
    )
  }

  const runMigrations: RunMigrationFn = async (): Promise<void> => {
    await applyMigration({
      modulesNames: Object.keys(allModules),
    })
  }

  const revertMigrations: RevertMigrationFn = async (
    modulesNames
  ): Promise<void> => {
    await applyMigration({
      modulesNames,
      action: "revert",
    })
  }

  const generateMigrations: GenerateMigrations = async (
    modulesNames
  ): Promise<void> => {
    await applyMigration({