Skip to content

Commit

Permalink
Conflict in merge_identities
Browse files Browse the repository at this point in the history
  • Loading branch information
wschuell committed Dec 3, 2024
1 parent 7089cb6 commit aa593db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions repodepo/extras/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,9 @@ def merge_identities(self):
SELECT %(identity)s,id FROM identity_types WHERE name=%(it)s
AND NOT EXISTS (SELECT 1 FROM identities i
INNER JOIN identity_types it
ON i.identity=%(identity)s AND i.identity_type_id=it.id AND it.name=%(it)s)
ON i.identity=%(identity)s AND i.identity_type_id=it.id AND it.name=%(it)s
)
ON CONFLICT DO NOTHING
;
INSERT INTO identities(identity,identity_type_id,attributes,created_at,inserted_at,is_bot,user_id)
SELECT %(identity)s,
Expand All @@ -1401,7 +1403,7 @@ def merge_identities(self):
else:
self.dest_db.cursor.executemany(
"""
INSERT INTO users(
INSERT OR IGNORE INTO users(
creation_identity,
creation_identity_type_id)
SELECT :identity,id FROM identity_types WHERE name=:it
Expand Down

0 comments on commit aa593db

Please sign in to comment.