feat: 添加prisma

chore: 添加cache和/prisma/migrations到.gitignore
This commit is contained in:
ngc2207 2024-11-10 23:45:44 +08:00
parent 534c47c5b7
commit a1fcc718cd
4 changed files with 24 additions and 2 deletions

6
.gitignore vendored
View File

@ -38,3 +38,9 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
# cache
cache
# prisma
/prisma/migrations

BIN
bun.lockb

Binary file not shown.

View File

@ -9,9 +9,11 @@
"lint": "next lint"
},
"dependencies": {
"@prisma/client": "5.22.0",
"next": "15.0.2",
"prisma": "^5.22.0",
"react": "19.0.0-rc-02c0e824-20241028",
"react-dom": "19.0.0-rc-02c0e824-20241028",
"next": "15.0.2"
"react-dom": "19.0.0-rc-02c0e824-20241028"
},
"devDependencies": {
"typescript": "^5",

14
prisma/schema.prisma Normal file
View 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
}