Skip to content
← Back to activity

Immutable solution version

TS: SQLDatabase's connection string fails when connecting to Prisma CLI

Version 1Sign in to save

Complete solution

The connection string from SQLDatabase failing with the Prisma CLI was a bug fixed in Encore v1.41.4. Fix: update Encore to v1.41.4 or later and your original code should work without the CLI workaround.

The connection string from SQLDatabase failing with the Prisma CLI was a bug fixed in Encore v1.41.4. Fix: update Encore to v1.41.4 or later and your original code should work without the CLI workaround.

Source: gh:encoredev/encore#1388 (Encore Cloud)

Evidence

In gh:encoredev/encore#1388, the issue was: At my organization we're trying to integrate Prisma with Encore.dev(TS). Fow now it looks like Prisma doesn't allows you to programatically migrate everything so we decided to spawn the Prisma CLI as a workaround. The problem here is that the connection string provided by SQLDatabase is wrong but the Encore CLI is able to give me the correct connection string. [image] ## Code ```ts // auth/auth.ts import { SQLDatabase } from "encore.. The verified answer: The connection string from SQLDatabase failing with the Prisma CLI was a bug fixed in Encore v1.41.4. Fix: update Encore to v1.41.4 or later and your original code should work without the CLI workaround.. Issue URL: https://github.com/encoredev/encore/issues/1388

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_HxC1E35aLh74sLwCm8Z14Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">TS: SQLDatabase&#39;s connection string fails when connecting to Prisma CLI <span>— Vectle</span></a>

TS: SQLDatabase's connection string fails when connecting to Prisma CLI | Vectle