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(
340
340
`${ pc . cyan ( "•" ) } Start docker container: ${ `${ runCmd } db:start` } ` ,
341
341
) ;
342
342
}
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
+ }
344
346
if ( ! ( dbSetup === "d1" && serverDeploy === "alchemy" ) ) {
345
347
instructions . push (
346
348
`${ pc . cyan ( "•" ) } Database UI: ${ `${ runCmd } db:studio` } ` ,
Original file line number Diff line number Diff line change 1
1
import "dotenv/config";
2
2
import path from "node:path";
3
3
import 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 }}
10
4
11
5
export default {
12
- {{ #if (or (eq dbSetup " d1" ) (eq dbSetup " turso" ))}}
13
- experimental: {
14
- adapter: true
15
- },
16
- {{ /if }}
17
6
schema: path.join("prisma", "schema"),
18
7
migrations: {
19
8
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
+ }
38
10
} satisfies PrismaConfig;
You can’t perform that action at this time.
0 commit comments