Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for archiving more than one account ever #29

Merged
merged 3 commits into from
Nov 30, 2017
Merged

Conversation

cainlevy
Copy link
Member

Previously, the uniqueness constraint on the database would complain when a second account was deleted. This changeset generates random username placeholders when archiving.

There is a very small chance of collision in applications where the username is not validated as an email. This remote possibility seems better than the likely bugs and follow-on effects that could result from adding nil-able usernames into the data model.

sometimes teardown can fail and leave artifacts in the database
this defeats the uniqueness constraint while still removing personal
information. the random hash is then removed when fetching a record so
that there's no confusion in the app.

this approach seems better than making the field nullable and creating
a vector for new and fun go panics.
@cainlevy cainlevy merged commit e8b6d7c into master Nov 30, 2017
@cainlevy cainlevy deleted the archive-many branch November 30, 2017 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant