prisma-converter

Convert your Prisma 1.0 datamodel to Prisma 2.0

Usage no npm install needed!

<script type="module">
  import prismaConverter from 'https://cdn.skypack.dev/prisma-converter';
</script>

README

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