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
ColumnTypeConstraintsDescription
iduuidprimary key
post_iduuidnot null, references posts.id
editor_iduuidreferences users.id
revision_numbersmallintnot null
bodytextnot null
reasonvarchar(255)
created_attimestamptznot null

Indexes (1)

  • (post_id, revision_number) unique

Relationships

  • post_revisions.post_id references posts.id
  • post_revisions.editor_id references users.id