dhatGuy
08/10/2021, 4:49 PMThe table `public.Profile` does not exist in the current database.
Error: The table `public.Profile` does not exist in the current database.
The table ought to be public.profile
dhatGuy
08/10/2021, 4:52 PM// This is your Prisma schema file,
// learn more about it in the docs: <https://pris.ly/d/prisma-schema>
datasource db {
provider = "postgresql"
url = env("NEXT_APP_DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
enum Role {
ADMIN
DOCTOR
RECEPTIONIST
NURSE
PATIENT
}
model User {
id String @id @default(uuid())
name String?
email String? @unique
emailVerified DateTime? @map(name: "email_verified")
image String?
role Role @default(PATIENT)
password String?
createdAt DateTime @default(now()) @map(name: "created_at")
updatedAt DateTime @default(now()) @map(name: "updated_at")
profile Profile?
@@map(name: "users")
}
model Profile {
id Int @id @default(autoincrement())
user User @relation(fields: [userId], references: [id])
userId String @unique
firstname String?
lastname String?
dob DateTime?
blood_group String?
image String?
age Int?
gender String?
phone String?
createdAt DateTime @default(now()) @map(name: "created_at")
updatedAt DateTime @default(now()) @map(name: "updated_at")
@@map(name: "profile")
}
model Account {
id Int @id @default(autoincrement())
compoundId String @unique @map(name: "compound_id")
userId String @map(name: "user_id")
providerType String @map(name: "provider_type")
providerId String @map(name: "provider_id")
providerAccountId String @map(name: "provider_account_id")
refreshToken String? @map(name: "refresh_token")
accessToken String? @map(name: "access_token")
accessTokenExpires DateTime? @map(name: "access_token_expires")
createdAt DateTime @default(now()) @map(name: "created_at")
updatedAt DateTime @default(now()) @map(name: "updated_at")
@@index([providerAccountId], name: "providerAccountId")
@@index([providerId], name: "providerId")
@@index([userId], name: "userId")
@@map(name: "accounts")
}
model Session {
id Int @id @default(autoincrement())
userId Int @map(name: "user_id")
expires DateTime
sessionToken String @unique @map(name: "session_token")
accessToken String @unique @map(name: "access_token")
createdAt DateTime @default(now()) @map(name: "created_at")
updatedAt DateTime @default(now()) @map(name: "updated_at")
@@map(name: "sessions")
}
model VerificationRequest {
id Int @id @default(autoincrement())
identifier String
token String @unique
expires DateTime
createdAt DateTime @default(now()) @map(name: "created_at")
updatedAt DateTime @default(now()) @map(name: "updated_at")
@@map(name: "verification_requests")
}
Ryan
08/12/2021, 6:10 AMprisma migrate deploy
when deploying?