mirror of
https://github.com/documenso/documenso.git
synced 2026-07-27 02:15:05 +10:00
feat: migrate nextjs to rr7
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `expires` on the `Session` table. All the data in the column will be lost.
|
||||
- Added the required column `expiresAt` to the `Session` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `updatedAt` to the `Session` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Account" ADD COLUMN "password" TEXT;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Session" DROP COLUMN "expires",
|
||||
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
ADD COLUMN "expiresAt" TIMESTAMP(3) NOT NULL,
|
||||
ADD COLUMN "ipAddress" TEXT,
|
||||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
ADD COLUMN "userAgent" TEXT;
|
||||
@@ -21,9 +21,9 @@
|
||||
"seed": "tsx ./seed-database.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/client": "5.4.2",
|
||||
"kysely": "^0.27.3",
|
||||
"prisma": "5.4.2",
|
||||
"@prisma/client": "^5.4.2",
|
||||
"kysely": "0.26.3",
|
||||
"prisma": "^5.4.2",
|
||||
"prisma-extension-kysely": "^2.1.0",
|
||||
"ts-pattern": "^5.0.6"
|
||||
},
|
||||
@@ -32,7 +32,7 @@
|
||||
"dotenv-cli": "^7.3.0",
|
||||
"prisma-json-types-generator": "^3.2.2",
|
||||
"prisma-kysely": "^1.8.0",
|
||||
"tsx": "^4.11.0",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "5.6.2",
|
||||
"zod-prisma-types": "3.1.9"
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ generator json {
|
||||
generator zod {
|
||||
provider = "zod-prisma-types"
|
||||
createInputTypes = false
|
||||
writeBarrelFiles = true
|
||||
writeBarrelFiles = false
|
||||
useMultipleFiles = true
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ datasource db {
|
||||
directUrl = env("NEXT_PRIVATE_DIRECT_DATABASE_URL")
|
||||
}
|
||||
|
||||
// Todo: Remove after RR7 migration.
|
||||
enum IdentityProvider {
|
||||
DOCUMENSO
|
||||
GOOGLE
|
||||
@@ -40,14 +41,14 @@ model User {
|
||||
customerId String? @unique
|
||||
email String @unique
|
||||
emailVerified DateTime?
|
||||
password String?
|
||||
password String? // Todo: Remove after RR7 migration.
|
||||
source String?
|
||||
signature String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
lastSignedIn DateTime @default(now())
|
||||
roles Role[] @default([USER])
|
||||
identityProvider IdentityProvider @default(DOCUMENSO)
|
||||
identityProvider IdentityProvider @default(DOCUMENSO) // Todo: Remove after RR7 migration.
|
||||
avatarImageId String?
|
||||
disabled Boolean @default(false)
|
||||
|
||||
@@ -269,18 +270,25 @@ model Account {
|
||||
scope String?
|
||||
id_token String? @db.Text
|
||||
session_state String?
|
||||
password String?
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([provider, providerAccountId])
|
||||
}
|
||||
|
||||
model Session {
|
||||
id String @id @default(cuid())
|
||||
sessionToken String @unique
|
||||
id String @id @default(cuid())
|
||||
sessionToken String @unique
|
||||
userId Int
|
||||
expires DateTime
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
ipAddress String?
|
||||
userAgent String?
|
||||
expiresAt DateTime
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
enum DocumentStatus {
|
||||
|
||||
Reference in New Issue
Block a user