refactor(prisma): 将数据库从 SQLite 迁移至 PostgreSQL

删除 SQLite 相关依赖、配置和生成文件,更新 Prisma schema 以使用 PostgreSQL 作为数据源。
移除本地 dev.db 文件、libsql 适配器和旧迁移文件,简化 Prisma 客户端初始化。
This commit is contained in:
2026-03-11 01:39:14 +08:00
parent 35d835f68c
commit 617300eaaf
26 changed files with 14 additions and 12578 deletions

View File

@@ -2,14 +2,11 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client"
output = "../src/generated/prisma"
engineType = "client"
runtime = "bun"
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
provider = "postgresql"
}
model User {
@@ -26,6 +23,8 @@ model User {
sessions Session[]
posts Post[]
comments Comment[]
@@map("users")
}
model Account {
@@ -41,7 +40,7 @@ model Account {
scope String?
id_token String?
session_state String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([provider, providerAccountId])
@@map("accounts")