chore: Deprecate extra in favor of driver options (#6772)
**What** Deprecate databse_extra in favor of database_driver_options Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
56481e683d
commit
1ef9c78cea
@@ -75,7 +75,7 @@ export async function mikroOrmCreateConnection(
|
||||
let schema = database.schema || "public"
|
||||
|
||||
let driverOptions = database.driverOptions ?? {
|
||||
connection: { ssl: true },
|
||||
connection: { ssl: false },
|
||||
}
|
||||
|
||||
let clientUrl = database.clientUrl
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { knex } from "@mikro-orm/knex"
|
||||
import { ModuleServiceInitializeOptions } from "@medusajs/types"
|
||||
import { isDefined } from "../common"
|
||||
|
||||
type Options = ModuleServiceInitializeOptions["database"]
|
||||
|
||||
@@ -9,7 +10,10 @@ type Options = ModuleServiceInitializeOptions["database"]
|
||||
*/
|
||||
export function createPgConnection(options: Options) {
|
||||
const { pool, schema = "public", clientUrl, driverOptions } = options
|
||||
const ssl = options.driverOptions?.ssl ?? false
|
||||
const ssl =
|
||||
options.driverOptions?.ssl ??
|
||||
options.driverOptions?.connection?.ssl ??
|
||||
false
|
||||
|
||||
return knex<any, any>({
|
||||
client: "pg",
|
||||
|
||||
Reference in New Issue
Block a user