prisma/schema.prisma
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource db {
provider = "postgres"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
}
model Post {
id String @id @default(uuid())
title String
text String
// To return `Date`s intact through the API we need to add data transformers
// https://trpc.io/docs/data-transformers
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
}