Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
How to init migration with existing database - Prisma
P
Prisma
•
8mo ago
•
4 replies
Coffee
How to init migration with existing database
I already have a database and there is data in it
. Now I want to use Prisma to connect with it
.So I do following
:
1
. Create a schema
.prisma file
, config datasource and generator
2
. Run
prisma db pull
prisma db pull
to get latest schema
3
. Run
prisma migrate dev
prisma migrate dev
to init migration
But step 3 got error
, Prisma tells me that my schema is not sync and prompts me to reset database
. It will cause data lost so I can
't do that
.
But if I want to sync a new model
(create a new table
) added in schema
.prisma file
, I need to do a migration
How can I solve this problem without data lost
?
Prisma
Join
The official Discord server of Prisma! Find us online at prisma.io
9,819
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
migration of existing db to Prisma Postgress
P
Prisma / help-and-questions
12mo ago
Existing Database in snake_case
P
Prisma / help-and-questions
14mo ago
migration failed to apply cleanly to the shadow database
P
Prisma / help-and-questions
2mo ago
SET UP PRISMA ON EXISTING DATABASE?
P
Prisma / help-and-questions
2y ago