Prisma-client-js: Support for schemas (Postgres Oracle etc.)

Created on 19 Nov 2019  路  8Comments  路  Source: prisma/prisma-client-js

Hello, great tool! Do you plan to support DB schemas as they exist in PostgreSQL for example?
BG

kinquestion

All 8 comments

What do you mean exactly @vanthome - if we want to support existing databases that already have a schema? Then yes, we have an "Introspection" step that can be used to create a Prisma schema file from an existing database (currently MySQL, Postgres or SQLite) that then can be used to generate Photon.

Or did I misunderstand?

Yes, you misunderstood. I'm not referring to the entirety of tables and other objects. I know the term is ambiguous and that's why I mentioned Postgres and Oracle. Please see here what a schema in Postgres is:

https://www.postgresql.org/docs/current/ddl-schemas.html

Oh, we do support Postgres schemas. We ask about them in our cli init flow:
image

Or you can add it to connection string like so:
image

Also, we don't currently support oracle. We support SQLite, MySQL and PostgreSQL

Sorry I didn't get your question in the first try, seemed to obvious to me as we really do support this for quite some time.

Does that answer you question @vanthome?
Or are there any aspects that @pantharshit00 did not touch on?

@janpio well kind of but I would assume you only support one schema at a time and not switching schemas at runtime, right?

Yes, we don't support querying across multiple schemas right now. Maybe you can open a new issue for that titled "Support for multiple (Postgres, Orcale) schemas".

Was this page helpful?
0 / 5 - 0 ratings

Related issues

divyenduz picture divyenduz  路  3Comments

MichalLytek picture MichalLytek  路  3Comments

Errorname picture Errorname  路  3Comments

macrozone picture macrozone  路  4Comments

mrmntte picture mrmntte  路  3Comments