Created
January 8, 2022 08:39
-
-
Save skolhustick/6b4ec2bf1887ee7a2ce5a1ccb43ce33f to your computer and use it in GitHub Desktop.
next-js-prisma-orm-mongodb-prisma:schema.prisma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prisma/schema.prisma | |
datasource db { | |
provider = "mongodb" | |
url = env("DATABASE_URL") | |
} | |
generator client { | |
provider = "prisma-client-js" | |
previewFeatures = ["mongoDb"] | |
} | |
model User { | |
id String @id @default(dbgenerated()) @map("_id") @db.ObjectId | |
email String? @unique | |
name String | |
birthYear Int | |
createdAt DateTime @default(now()) | |
updatedAt DateTime @updatedAt | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment