File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,12 +50,6 @@ AUTO_RELOAD=false
5050
5151# the database connection URL
5252DATABASE_URL = mysql://root@127.0.0.1:3306/project_canis
53- SHADOW_DATABASE_URL = mysql://root@127.0.0.1:3306/project_canis_shadow
54-
55- # prisma maria db adapter config
56- PRISMA_MARIA_DB_HOST = 127.0.0.1
57- PRISMA_MARIA_DB_PORT = 3306
58- PRISMA_MARIA_DB_CONNECTION_LIMIT = 5
5953
6054# redis cache
6155REDIS_URL = redis://127.0.0.1:6379
Original file line number Diff line number Diff line change 11import "dotenv/config" ;
2- import { defineConfig , env } from "prisma/config" ;
2+ import type { PrismaConfig } from "prisma" ;
3+ import { env } from "prisma/config" ;
34
4- export default defineConfig ( {
5+ export default {
6+ schema : "prisma/schema.prisma" ,
7+ migrations : {
8+ path : "prisma/migrations" ,
9+ // seed: "tsx prisma/seed.ts",
10+ } ,
511 datasource : {
612 url : env ( "DATABASE_URL" ) ,
7- shadowDatabaseUrl : env ( "SHADOW_DATABASE_URL" ) ,
813 } ,
9- } ) ;
14+ } satisfies PrismaConfig ;
Original file line number Diff line number Diff line change @@ -5,12 +5,7 @@ declare global {
55 var _sharedPrisma : PrismaClient | undefined ;
66}
77
8- const adapter = new PrismaMariaDb ( {
9- host : process . env . PRISMA_MARIA_DB_HOST || "127.0.0.1" ,
10- port : parseInt ( process . env . PRISMA_MARIA_DB_PORT || "3306" ) ,
11- connectionLimit : parseInt ( process . env . PRISMA_MARIA_DB_CONNECTION_LIMIT || "5" ) ,
12- } ) ;
13-
8+ const adapter = new PrismaMariaDb ( { } ) ;
149const prisma = global . _sharedPrisma ?? new PrismaClient ( { adapter } ) ;
1510
1611if ( process . env . NODE_ENV !== "production" ) {
You can’t perform that action at this time.
0 commit comments