I just changed the username of a person
xxx on their demand. they wanted to take an inactive username
yyy. so first I changed the inactive username
yyy to somthing else like
yyy1 and then changed that person username from
at this point, first, the user couldnt post anything and I saw the following error in the logs:
Job exception: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_users_on_username_lower" DETAIL: Key (username_lower)=(mina) already exists.
I tried to change back the username to what was before, now all of their history is gone. What exactly did go wrong here?