update prisma schema to mysql

This commit is contained in:
MarconLP 2023-04-10 20:59:27 +02:00
parent 848aaf62e3
commit ebc916c26d
No known key found for this signature in database
GPG key ID: F4CAFFDFA3451D5E

View file

@ -6,12 +6,13 @@ generator client {
} }
datasource db { datasource db {
provider = "sqlite" provider = "mysql"
// NOTE: When using postgresql, mysql or sqlserver, uncomment the @db.Text annotations in model Account below // NOTE: When using postgresql, mysql or sqlserver, uncomment the @db.Text annotations in model Account below
// Further reading: // Further reading:
// https://next-auth.js.org/adapters/prisma#create-the-prisma-schema // https://next-auth.js.org/adapters/prisma#create-the-prisma-schema
// https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#string // https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#string
url = env("DATABASE_URL") url = env("DATABASE_URL")
relationMode = "prisma"
} }
model Video { model Video {
@ -29,12 +30,12 @@ model Account {
type String type String
provider String provider String
providerAccountId String providerAccountId String
refresh_token String? // @db.Text refresh_token String? @db.Text
access_token String? // @db.Text access_token String? @db.Text
expires_at Int? expires_at Int?
token_type String? token_type String?
scope String? scope String?
id_token String? // @db.Text id_token String? @db.Text
session_state String? session_state String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade) user User @relation(fields: [userId], references: [id], onDelete: Cascade)