Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save skolhustick/6b4ec2bf1887ee7a2ce5a1ccb43ce33f to your computer and use it in GitHub Desktop.
Save skolhustick/6b4ec2bf1887ee7a2ce5a1ccb43ce33f to your computer and use it in GitHub Desktop.
next-js-prisma-orm-mongodb-prisma:schema.prisma
// 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