1.0.4 • Published 3 years ago

prisma-converter v1.0.4

Weekly downloads
2
License
MIT
Repository
-
Last release
3 years ago

Prisma Convert

Convert your Prisma 1.0 datamodel to Prisma 2.0

Usage

npx prisma-converter <datamodel.graphql>

It turns your legacy datamodel specification into an upcoming Prisma 2 data model.

type Post {
  id: ID! @id
  title: String!
  content: String
  author: User!
}

type User {
  id: ID! @id
  email: String! @unique
  name: String!
}
datasource pg {
  provider = "postgres"
  url      = env("POSTGRESQL_URL")
}

generator photon {
  provider = "prisma-client-js"
}

model Post {
  id      String  @id @default(cuid())
  title   String
  content String?
  author  User
}

model User {
  id    String @id @default(cuid())
  email String @unique
  name  String
}

Specification

License

MIT @ Matic Zavadlal