Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Support for schemas (Postgres Oracle etc.) #301

Closed
vanthome opened this issue Nov 19, 2019 · 8 comments
Closed

Support for schemas (Postgres Oracle etc.) #301

vanthome opened this issue Nov 19, 2019 · 8 comments
Assignees
Labels
kind/question Developer asked a question. No code changes required.

Comments

@vanthome
Copy link

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

@janpio
Copy link
Member

janpio commented Nov 21, 2019

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?

@janpio janpio self-assigned this Nov 21, 2019
@pantharshit00 pantharshit00 added the kind/question Developer asked a question. No code changes required. label Nov 21, 2019
@pantharshit00
Copy link
Contributor

@vanthome
Copy link
Author

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

@pantharshit00
Copy link
Contributor

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

@janpio
Copy link
Member

janpio commented Nov 27, 2019

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?

@vanthome
Copy link
Author

vanthome commented Dec 1, 2019

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

@pantharshit00
Copy link
Contributor

pantharshit00 commented Dec 2, 2019

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".

@pantharshit00
Copy link
Contributor

Closing in favour of prisma/prisma#1122

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/question Developer asked a question. No code changes required.
Projects
None yet
Development

No branches or pull requests

3 participants