Skip to content

Commit

Permalink
Merge pull request #4 from mattmediavine/feat/add-override-datasources
Browse files Browse the repository at this point in the history
Allow use of overrideDatasources db url with Pool connectionString
  • Loading branch information
exAspArk authored Nov 8, 2024
2 parents 02dd508 + 602920f commit d19b681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const withPgAdapter = <PrismaClientType>(
},
})

const { url } = prisma._engineConfig.inlineDatasources.db
const { url } = prisma._engineConfig.overrideDatasources?.db ?? prisma._engineConfig.inlineDatasources.db
const pool = new Pool({ connectionString: url.value || process.env[url.fromEnvVar] });
const pgAdapter = new PrismaPg(pool, undefined, { logQueries });
prisma._engineConfig.logQueries = false
Expand Down

0 comments on commit d19b681

Please sign in to comment.