1 parent ff8946b commit 74e7649Copy full SHA for 74e7649
1 file changed
prisma/initdb.ts
@@ -1,18 +1,18 @@
1
import { PrismaClient } from '@prisma/client'
2
-import { config } from 'dotenv'
+ import { config } from 'dotenv'
3
import { existsSync } from 'fs'
4
5
// 按Next.js优先级加载环境变量
6
if (existsSync('.env.local')) {
7
config({ path: '.env.local' })
8
} else {
9
config({ path: '.env' })
10
-}
+}
11
12
const prisma = new PrismaClient()
13
14
async function main() {
15
- console.log('🌱 清空原来数据库...')
+/* console.log('🌱 清空原来数据库...')
16
17
// 清空现有数据
18
await prisma.voucher.deleteMany()
@@ -21,7 +21,7 @@ async function main() {
21
await prisma.checkinPhoto.deleteMany()
22
await prisma.route.deleteMany()
23
await prisma.user.deleteMany()
24
-
+ */
25
26
27
0 commit comments