Tahinli/forge
public0 watching
★ 0
| 1 | -- GPG keys users added for commit verification, and the cached verification result per commit. |
| 2 | -- Applied by store/migrate.rs. Timestamps are RFC 3339 UTC stamps from time.rs. |
| 3 | -- The armored public key is stored as given. `emails` is a JSON array of the key's uid emails. |
| 4 | -- Rows are deleted with the user (user_delete.rs) and with the repo (Store::delete_repo). |
| 5 | |
| 6 | ( |
| 7 | id TEXT PRIMARY KEY, |
| 8 | user_id TEXT NOT NULL REFERENCES users(id), |
| 9 | fingerprint TEXT NOT NULL UNIQUE, |
| 10 | armored TEXT NOT NULL, |
| 11 | emails TEXT NOT NULL, |
| 12 | created_at TEXT NOT NULL |
| 13 | ); |
| 14 | |
| 15 | ON gpg_keys (user_id); |
| 16 | |
| 17 | -- status: verified | unverified | unsigned | unknown_key | bad. kind: ssh | gpg, NULL when unsigned. |
| 18 | -- signer_user_id is set when the signing key is known to belong to a user. It has no foreign key |
| 19 | -- because user deletion clears these rows explicitly. |
| 20 | ( |
| 21 | repo_id TEXT NOT NULL REFERENCES repos(id), |
| 22 | oid TEXT NOT NULL, |
| 23 | status TEXT NOT NULL, |
| 24 | kind TEXT, |
| 25 | signer_user_id TEXT, |
| 26 | key_fingerprint TEXT, |
| 27 | checked_at TEXT NOT NULL, |
| 28 | PRIMARY KEY (repo_id, oid) |
| 29 | ); |
| 30 | |
| 31 | ON commit_signatures (signer_user_id); |