<@UAXT7068Z> Are you want to connect a external db...
# orm-help
j
@An Tran Are you want to connect a external db? In the docker-compose.yml overwrite the host: mysql host: host.docker.internal
a
@Jeff No. I have connected to my local MySQL. It will create schemas when I make a query or mutation. But now I really have an schema in MySQL with a lot of data. Can Prisma use an existing schema. I don’t want to create a new one
c
@An Tran here is the open issue tracking the development of the "passive" connector for MySQL: https://github.com/prismagraphql/prisma/issues/2506
a
@cmcinroy yeah, I see. So are there any the best ways to migrate data to the new schema created by Prisma?
c
well... whether that approach is best for you depends on how "attached" you are to your current database (model and instance(s)). here is some info on the suggested approach for importing data: https://github.com/prismagraphql/prisma/issues/1642
so, the philosophy for "active" database connectors (as i understand it) is: maintain your model in the graphql schema and keep your database model in sync with that.
the "passive" approach is the opposite: for those who are tied to an existing database ( raiseshand ) : use prisma to generate the graphql schema from the existing database model.
initially (i believe), graphql was new enough that it's primary use case was for new development. now that the groundswell/momentum has grown, there is growing interest in the use case for integrating with and evolving existing applications/architecture... which means dealing with existing database platforms. hence, development in relational database connectors -- and passive connectors, in particular -- is catching up.
a
I am trying to restructure existing system and i work with graphql as a good choice. Thank you for your advice @cmcinroy
👍 1