notiz-dev / prisma-dbml-generator

Prisma DBML Generator
MIT License
684 stars 36 forks source link

Feature Request: Multi-Schema Support #42

Open albertilagan opened 1 year ago

albertilagan commented 1 year ago

Seems like Prisma's multiSchema previewFeature does not work with the latest version (0.10.0).

Are we waiting for it to be on GA? or is this something we can implement already?

marcjulian commented 1 year ago

Hi @albertilagan, we don't need to wait for multiSchema to hit GA. If you like you could create a PR to support this feature.

Things to consider:

  1. Does Prisma surface multiSchema information in the DMMF? (clone this project and comment in https://github.com/notiz-dev/prisma-dbml-generator/blob/main/src/cli/dbml-generator.ts#L26 to receive a DMMF file and run npm run dev)
  2. How does schema look like in the DBML?
albertilagan commented 1 year ago

Hi @albertilagan, we don't need to wait for multiSchema to hit GA. If you like you could create a PR to support this feature.

Things to consider:

  1. Does Prisma surface multiSchema information in the DMMF? (clone this project and comment in https://github.com/notiz-dev/prisma-dbml-generator/blob/main/src/cli/dbml-generator.ts#L26 to receive a DMMF file and run npm run dev)
  2. How does schema look like in the DBML?

Hi, @marcjulian just saw this, and upon checking looks like the schema value is not yet exposed on DMMF. Will wait for Prisma, or maybe I'll create a PR there as well when I have the time :)

albertilagan commented 1 year ago

Hi @albertilagan, we don't need to wait for multiSchema to hit GA. If you like you could create a PR to support this feature.

Things to consider:

  1. Does Prisma surface multiSchema information in the DMMF? (clone this project and comment in https://github.com/notiz-dev/prisma-dbml-generator/blob/main/src/cli/dbml-generator.ts#L26 to receive a DMMF file and run npm run dev)
  2. How does schema look like in the DBML?

Can't wait for Prisma so I just bruteforce my way into it. multiSchema Support

Definitely not the best way to implement this but this works for us for now.