I am using Prisma version 3.8.1. Prisma client does not mark the User.oauthData property as nullable in TS. Can someone help? Prisma schema and generated SQL files below:
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Account {
id BigInt @id
createdAt DateTime @db.Timestamptz(3) @default(now())
updatedAt DateTime @db.Timestamptz(3) @updatedAt
name String
users User[]
}
model User {
id BigInt @id
createdAt DateTime @db.Timestamptz(3) @default(now())
updatedAt DateTime @db.Timestamptz(3) @updatedAt
accountId BigInt
account Account @relation(fields: [accountId], references: [id])
fullName String
email String
oauthData Json?
}
-- CreateTable
CREATE TABLE "Account" (
"id" BIGINT NOT NULL,
"createdAt" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMPTZ(3) NOT NULL,
"name" TEXT NOT NULL,
CONSTRAINT "Account_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "User" (
"id" BIGINT NOT NULL,
"createdAt" TIMESTAMPTZ(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updatedAt" TIMESTAMPTZ(3) NOT NULL,
"accountId" BIGINT NOT NULL,
"fullName" TEXT NOT NULL,
"email" TEXT NOT NULL,
"oauthData" JSONB,
CONSTRAINT "User_pkey" PRIMARY KEY ("id")
);
-- AddForeignKey
ALTER TABLE "User" ADD CONSTRAINT "User_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "Account"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
I am using Prisma version 3.8.1. Prisma client does not mark the User.oauthData property as nullable in TS. Can someone help? Prisma schema and generated SQL files below: