-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Store a MD5 hash of content for stored messages #187
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment on top of the ruff required changes
|
||
def upgrade() -> None: | ||
"""Apply the current migration.""" | ||
op.add_column("messages", sa.Column("content_hash", sa.String(), nullable=False)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to either define a default value here, or add a migration so that existing rows meet the NOT NULL
constraint added by setting nullable=False
here
6fc204b
to
bfa0ae3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
bfa0ae3
to
e433585
Compare
Storing an MD5 hash of content allows us to perform tasks related to the content of identical messages without compromising our promise of privacy and not storing actual user generated content.
With this field, we can: