Skip to content

Commit

Permalink
[WIP] Add incomplete class to handle duplicate emails
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Sep 19, 2024
1 parent a6cde3c commit 12cde55
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/galaxy/model/migrations/data_fixes/user_table_fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,16 @@ def _generate_next_available_username(self, username):
while self.connection.execute(select(User).where(User.username == f"{username}-{i}")).first():
i += 1
return f"{username}-{i}"


class EmailDeduplicator:

def __init__(self, connection):
self.connection = connection

def run(self):
"""
Deduplicate user emails by generating a unique value for all duplicates, keeping
the email of the most recently created user unchanged.
"""
# TODO

0 comments on commit 12cde55

Please sign in to comment.