New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introspection for MySQL connector to connect to existing databases #2506

Open
marktani opened this Issue May 24, 2018 · 12 comments

Comments

Projects
None yet
9 participants
@marktani
Copy link
Contributor

marktani commented May 24, 2018

Feature Request

Connecting to existing databases requires introspection to generate the according datamodel.

This feature request is used to track our progess for support of MySQL introspection.

@davesimtech

This comment has been minimized.

Copy link

davesimtech commented May 25, 2018

It might be useful to output a warning/error message for the time being (e.g. connecting to existing MySQL databases is not yet implemented) before creating the introspector (in EndpointDialog.ts line 261) as at first I thought I had got the wrong mysql connection settings!

image

@ghost

This comment has been minimized.

Copy link

ghost commented Jul 11, 2018

Please could you share when is this feature planned for release

@chrisbull

This comment has been minimized.

Copy link

chrisbull commented Jul 25, 2018

Something like PostGraphile (https://github.com/graphile/postgraphile) could be an interesting start. I used it to get the initial database schema structure from my clients existing database, and then exported the schemeInfo, and then only used the primary objects and rewrote them to use Prisma. It's not a 100%, but so far it's a start. Looking forward for the real prisma feature to come though!

@jamesmbowler

This comment has been minimized.

Copy link
Contributor

jamesmbowler commented Sep 6, 2018

Are you looking for pull requests for this?

https://github.com/jamesmbowler/prisma/tree/mysqlIntrospection_2

@johndaskovsky

This comment has been minimized.

Copy link

johndaskovsky commented Sep 14, 2018

Is it possible to connect to an existing MySQL database without introspection?

Any estimates for when introspection for MySQL will be ready?

@jamesmbowler

This comment has been minimized.

Copy link
Contributor

jamesmbowler commented Sep 14, 2018

Hey John, feel free to try out my branch, linked in my previous comment. It would be nice to have someone else test it. Just pull it (into ~/prisma), and, from your directory where you have prisma.yml, etc, run nodejs ~/prisma/cli/packages/prisma-cli/dist/index.js introspect . Let me know if you have any questions. Again, I'd love for mysql introspection to be added to prisma, asap.

@johndaskovsky

This comment has been minimized.

Copy link

johndaskovsky commented Sep 14, 2018

Hey @jamesmbowler -- I'll definitely give it a try! For local development I'm running MAMP. Any suggestions for how to get the configuration working with that setup?

@jamesmbowler

This comment has been minimized.

Copy link
Contributor

jamesmbowler commented Sep 14, 2018

@johndaskovsky - I don't think windows should be a problem, but I don't know. This will depend on which version you are using, because the format of prisma.yml has changed, so it won't work with 1.18, I believe.

  1. clone the repo to ~/prisma
  2. create a directory, let's call it "testing", and cd into that directory
  3. make sure you have prisma.yml and docker-compose.yml set up (see the docs for that)
  4. run nodejs ~/prisma/cli/packages/prisma-cli/dist/index.js introspect

There is a really good chance this won't work, for a lot of reasons. But, I am trying to get it into the product.

@johndaskovsky

This comment has been minimized.

Copy link

johndaskovsky commented Sep 20, 2018

Hey @jamesmbowler - I worked on this today. Looks like your original branch from this thread is not still available. I tested with https://github.com/jamesmbowler/prisma/tree/mysqlIntrospection_2 but wasn't able to get that working. Happy to try again once your new version is ready. Thanks!

@cr101

This comment has been minimized.

Copy link

cr101 commented Oct 31, 2018

A MySQL connector to connect to an existing WordPress database would be very powerful for building a headless WordPress web app using React.

@Lleios

This comment has been minimized.

Copy link

Lleios commented Dec 14, 2018

Can we know if there is progress on this feature and have an estimated release date?

@gj1118

This comment has been minimized.

Copy link

gj1118 commented Dec 22, 2018

@marktani , Were about able to get around this problem, if so can you please let me know how ?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment