In the same member merging process described in my last post, I was running a bit of code with a TRY/CATCH that looked for a duplicate primary key condition and, if found, deleted it from the source account:
<cfquery name=”select” datasource=”#variables.datasource.getName()#”>
SELECT *
FROM roles
WHERE id = ‘#id#’
</cfquery>
<cfloop query=”select”>
<cftry>
<cfquery name=”update” datasource=”#variables.datasource.getName()#”>
UPDATE roles
SET id = ‘#target#’
WHERE id = ‘#id#’
AND [...]