post_revisions table
The post_revisions table in the Forum Database Schema schema has 7 columns, keyed by id, with 2 foreign keys to posts and users.
Edit history, append-only. A forum without this cannot settle an argument about what somebody actually wrote.
Columns (7)
Columns of the post_revisions table| Column | Type | Constraints | Description |
|---|
| id | uuid | primary key | |
|---|
| post_id | uuid | not null, references posts.id | |
|---|
| editor_id | uuid | references users.id | |
|---|
| revision_number | smallint | not null | |
|---|
| body | text | not null | |
|---|
| reason | varchar(255) | | |
|---|
| created_at | timestamptz | not null | |
|---|
Indexes (1)
(post_id, revision_number) unique
Relationships
post_revisions.post_id references posts.idpost_revisions.editor_id references users.id