Skip to content

How to replicate the schema prism model in the database #2306

Answered by ryands17
felinto-dev asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @felinto-dev 👋

Prisma2 is different in a way from Prisma1 that it doesn't require any additional server to deploy to,
It is just a DB access layer that helps you query your database.

You can get started with the examples here and also learn more about getting started with Prisma 2 here

You can use prisma migrate. It is similar to prisma deploy in the sense that it creates all migrations against your database.

For e.g.

  1. Create your model in the schema.prisma
model Post {
  id        Int      @default(autoincrement()) @id
  createdAt DateTime @default(now())
  title     String
  content   String?
  published Boolean  @default(false)
  author    User     @relation(fields: [authorId], ref…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jharrell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants