I am migrating from graphcool to prisma and I am t...
# prisma-migrate
j
I am migrating from graphcool to prisma and I am trying to run “prisma import” with my GC data a second time and I get:
Copy code
Cause: .SQLIntegrityConstraintViolationException: (conn=567) Duplicate entry 'cjmlq59d62tvm01838cb26o1h' for key 'PRIMARY'"
I do this because I want most of my prod data to be in my prisma DB before launch and on launch day just import the recently added data. Does anyone know if it is possible to tell prisma import to ignore existing entries?
t
@Josef Henryson Ya man the prisma import tool just like… straight up doesn’t work most of the time, they’ve basically abandoned its problems since it’s too difficult to save the problems it has it seems. So they’re basically telling everyone to figure out how to use the SQL dump methods of MySQL or Postgres. For MySQL I downloaded MySQL Workbench, and just did a raw sql export and import to my database. I was able to get the GC export to import into my local DB, but then getting that imported into my production DB wasn’t working. So I had to just use the Workbench to do a native export/import
The graphcool export seems to give the correct export, the prisma export seems to be broken
And as far as I know, no there is no way to tell the prisma import to ignore duplicate data entries
As I mentioned earlier, they stopped improving the import and opted to abandon it entirely since they realized they needed to do a rewrite with Prisma 2 anyways
j
@tmoney thanks for yor reply! I ended up with just exporting the full DB from GC. I was hoping to being able to just export/imort the final piece of data on launch day, but I think it will go quite well with a full export as well. I just have to handle relations/lists manually since it fails in GC export, but there I can prepare moste of the lists beforehand.