File tree Expand file tree Collapse file tree 2 files changed +4
-30
lines changed
templates/db/prisma/sqlite Expand file tree Collapse file tree 2 files changed +4
-30
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,9 @@ async function getDatabaseInstructions(
340340 `${ pc . cyan ( "•" ) } Start docker container: ${ `${ runCmd } db:start` } ` ,
341341 ) ;
342342 }
343- instructions . push ( `${ pc . cyan ( "•" ) } Apply schema: ${ `${ runCmd } db:push` } ` ) ;
343+ if ( ! ( dbSetup === "d1" && serverDeploy === "alchemy" ) ) {
344+ instructions . push ( `${ pc . cyan ( "•" ) } Apply schema: ${ `${ runCmd } db:push` } ` ) ;
345+ }
344346 if ( ! ( dbSetup === "d1" && serverDeploy === "alchemy" ) ) {
345347 instructions . push (
346348 `${ pc . cyan ( "•" ) } Database UI: ${ `${ runCmd } db:studio` } ` ,
Original file line number Diff line number Diff line change 11import "dotenv/config";
22import path from "node:path";
33import type { PrismaConfig } from "prisma";
4- {{ #if (eq dbSetup " d1" )}}
5- import { PrismaD1 } from "@prisma/adapter-d1";
6- {{ /if }}
7- {{ #if (eq dbSetup " turso" )}}
8- import { PrismaLibSQL } from "@prisma/adapter-libsql";
9- {{ /if }}
104
115export default {
12- {{ #if (or (eq dbSetup " d1" ) (eq dbSetup " turso" ))}}
13- experimental: {
14- adapter: true
15- },
16- {{ /if }}
176 schema: path.join("prisma", "schema"),
187 migrations: {
198 path: path.join("prisma", "migrations"),
20- },
21- {{ #if (eq dbSetup " d1" )}}
22- async adapter() {
23- return new PrismaD1({
24- CLOUDFLARE_D1_TOKEN: process.env.CLOUDFLARE_D1_TOKEN,
25- CLOUDFLARE_ACCOUNT_ID: process.env.CLOUDFLARE_ACCOUNT_ID,
26- CLOUDFLARE_DATABASE_ID: process.env.CLOUDFLARE_DATABASE_ID,
27- });
28- },
29- {{ /if }}
30- {{ #if (eq dbSetup " turso" )}}
31- async adapter() {
32- return new PrismaLibSQL({
33- url: process.env.DATABASE_URL || "",
34- authToken: process.env.DATABASE_AUTH_TOKEN,
35- });
36- },
37- {{ /if }}
9+ }
3810} satisfies PrismaConfig;
You can’t perform that action at this time.
0 commit comments