Issue 11307
At the moment of migrating from LIVE to STAGING some agents have multiple primary contacts for a same contact type
11307
Reporter: jcuadra
Assignee: fmendez
Type: Bug
Summary: At the moment of migrating from LIVE to STAGING some agents have multiple primary contacts for a same contact type
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2012-06-07 12:18:42.404
Updated: 2013-12-16 17:50:58.287
Resolved: 2012-06-13 16:31:25.513
TimeEstimate: 0
TimeSpent: 3600
Description: On registry-staging there are more than one primary contact for a same contact type. This does not comply with the rule we had been enforcing on our Registry to just have at most 1 primary contact per contact type.
On staging, this problem can be seen here:
registry-staging> SELECT agent_id, count(agent_id) as ccc FROM contact c where is_primary_contact=1 and type=17000 and deleted is null group by agent_id order by ccc desc
On the live registry this problem does not happen:
nerf> SELECT agent_id, count(agent_id) as ccc FROM contact c where is_primary_contact=1 and type='technical' and deleted is null group by agent_id order by ccc
nerf> SELECT agent_id, count(agent_id) as ccc FROM contact c where is_primary_contact=1 and type='administrative' and deleted is null group by agent_id order by ccc]]>
Author: trobertson@gbif.org
Created: 2012-06-07 12:21:59.265
Updated: 2012-06-07 12:21:59.265
I can imagine this comes from the portal DB which are copied in blindly.
Propose the solution is to append to the cleanup stage in the migration script.