Hi there, wondering what is the best way to do dat...
# orm-help
r
Hi there, wondering what is the best way to do data migration between databases? I have 2 separate databases (in the same Google cloudsql instance). They both have the same schema. db A is populated and db B is empty. I would like to make a copy of db A to db B. I ran
prisma export
for db A. Then I ran
prisma import -d <data-from-db-a-export>
. The nodes and lists imported fine but it constantly gives me error with relations in the format of
"Failure inserting into relationtable _SurveyQuestionToSurveyResponse with ids StringIdGCValue(cjrcatjb9eeaa0754rfpxi0ay) and StringIdGCValue(cjrcau0oaeryc0754msyvwl3u). Cause: duplicate key value violates unique constraint \"_SurveyQuestionToSurveyResponse_AB_unique\"\n  Detail: Key (\"A\", \"B\")=(cjrcatjb9eeaa0754rfpxi0ay, cjrcau0oaeryc0754msyvwl3u) already exists."
. Given that db B is initially empty and has the same schema as db A, what could be the possible causes? Thanks
👍 1
i
Did you ever solve this?