Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Support database migrations for existing databases #2345

Closed
sorenbs opened this issue May 4, 2018 · 4 comments
Closed

Support database migrations for existing databases #2345

sorenbs opened this issue May 4, 2018 · 4 comments

Comments

@sorenbs
Copy link
Member

sorenbs commented May 4, 2018

Starting with the 1.8 release Prisma will support existing databases.

Initially it will not be possible to use the Prisma migration system to change the structure of a preexisting database. The reason for this is that databases that has not been set up using Prisma can be configured in many different ways to achieve the same result. Prisma supports queries and mutations for most of these cases.

We should adapt the migration system to also work with databases of any shape.

This feature will allow you to use Prisma with a legacy database and perform all future database migrations using the convenient SDL based migration system.

@chj-damon
Copy link

@sorenbs Hi, I want to know if you can use prisma v1.8 to connect to an existed database now. I tried with its command prisma init and follow the steps after choosing to connect to existed database but it will fail for some reason. (the existed database is hosted in docker enviornment BTW.)

@sorenbs
Copy link
Member Author

sorenbs commented May 28, 2018

Hi @chj-damon - you should be able to connect to an existing Postgres database with Prisma 1.8. Did you manage to make it work? Otherwise I'd suggest you start a conversation in the forum so we can help you figure it out :-)

@chj-damon
Copy link

@sorenbs https://www.prisma.io/forum/t/how-to-connect-with-existing-database-with-v1-8/3454?u=damon.chen
I've already started a conversation in the forum. Would you like to help me figure out what is wrong?
Thanks for your help.

@stale
Copy link

stale bot commented Jan 9, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants