-
Notifications
You must be signed in to change notification settings - Fork 291
Hash history comments and sign them with the author's personal key. #6004
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
base: trunk
Are you sure you want to change the base?
Changes from 27 commits
986842e
1407fe4
28f3c94
6476649
fc2447f
2f65492
80a9142
a66d16c
6fed958
13405c4
cea3a7b
d969eec
caf7eb6
ccdc1b5
6d7a9dd
b9bdb87
82fd692
dbbbe9c
6b6a6ea
da98679
e680027
c9c6eb1
d428387
bb9cb61
aa40862
e53ff9a
b39f110
080fe0d
c88a25e
28e1af1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some changes here to support the new comment hashes, author thumbprints, and author signatures. |
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Part of the migration, this adds nullable versions of the new columns. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| -- Table for storing personal key thumbprints, | ||
| -- which we may later associate with users. | ||
| CREATE TABLE IF NOT EXISTS key_thumbprints ( | ||
| id INTEGER PRIMARY KEY, | ||
| thumbprint TEXT UNIQUE NOT NULL | ||
| ); | ||
|
|
||
| ALTER TABLE history_comments | ||
| -- The hash used for comment identity. | ||
| -- It's the hash of (causal_hash <> author <> created_at_ms) | ||
| ADD COLUMN comment_hash_id INTEGER NULL REFERENCES hash(id); | ||
|
|
||
| CREATE UNIQUE INDEX IF NOT EXISTS idx_history_comments_comment_hash_id | ||
| ON history_comments(comment_hash_id); | ||
|
|
||
| ALTER TABLE history_comments | ||
| ADD COLUMN author_thumbprint_id INTEGER NULL REFERENCES key_thumbprints(id); | ||
|
|
||
| ALTER TABLE history_comment_revisions | ||
| -- The hash used for this revision's identity. | ||
| -- It's the hash of (comment_hash <> subject <> contents <> hidden <> created_at_ms) | ||
| ADD COLUMN revision_hash_id INTEGER NULL REFERENCES hash(id); | ||
|
|
||
| ALTER TABLE history_comment_revisions | ||
| ADD COLUMN author_signature BLOB NULL; | ||
|
|
||
| CREATE UNIQUE INDEX IF NOT EXISTS idx_history_comment_revisions_revision_hash_id | ||
| ON history_comment_revisions(revision_hash_id); |
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.
This just moved due to import needs.