mirror of
https://litchi.icu/ngc2207/judge4c-demo.git
synced 2025-05-18 06:56:34 +00:00
feat: 添加prisma
chore: 添加cache和/prisma/migrations到.gitignore
This commit is contained in:
parent
534c47c5b7
commit
a1fcc718cd
6
.gitignore
vendored
6
.gitignore
vendored
@ -38,3 +38,9 @@ yarn-error.log*
|
|||||||
# typescript
|
# typescript
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
next-env.d.ts
|
next-env.d.ts
|
||||||
|
|
||||||
|
# cache
|
||||||
|
cache
|
||||||
|
|
||||||
|
# prisma
|
||||||
|
/prisma/migrations
|
@ -9,9 +9,11 @@
|
|||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@prisma/client": "5.22.0",
|
||||||
|
"next": "15.0.2",
|
||||||
|
"prisma": "^5.22.0",
|
||||||
"react": "19.0.0-rc-02c0e824-20241028",
|
"react": "19.0.0-rc-02c0e824-20241028",
|
||||||
"react-dom": "19.0.0-rc-02c0e824-20241028",
|
"react-dom": "19.0.0-rc-02c0e824-20241028"
|
||||||
"next": "15.0.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5",
|
"typescript": "^5",
|
||||||
|
14
prisma/schema.prisma
Normal file
14
prisma/schema.prisma
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
generator client {
|
||||||
|
provider = "prisma-client-js"
|
||||||
|
}
|
||||||
|
|
||||||
|
datasource db {
|
||||||
|
provider = "postgresql"
|
||||||
|
url = env("DATABASE_URL")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Snippet {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
title String
|
||||||
|
code String
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user