archesproject / arches-for-science

Arches for Science
12 stars 9 forks source link

AfS Migration filters are too restrictive #1546

Open aarongundel opened 5 months ago

aarongundel commented 5 months ago

An issue happens when deploying arches for science over an existing deployment - "duplicate key violates unique contstraint". This happens in the initial 0001 afs migration. This is strange because we call Plugin.objects.update_or_create - which should update the existing plugins rather than trying to pave them over. A cursory google suggests that the issue is likely that our filters for update_or_create are too restrictive. See the following

https://stackoverflow.com/questions/50915911/django-update-or-create-gets-duplicate-key-value-violates-unique-constraint

jacobtylerwalls commented 5 months ago

With luck, we can just do something like this: https://github.com/archesproject/arches/pull/10544/commits/cfccaa05fe7d894b25cb469b7d8b203128eaa582