Skip to content

Instantly share code, notes, and snippets.

@reosarevok
Last active December 2, 2021 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reosarevok/67bc8f1cc09b589cd76612ac5783ca50 to your computer and use it in GitHub Desktop.
Save reosarevok/67bc8f1cc09b589cd76612ac5783ca50 to your computer and use it in GitHub Desktop.
edit_note_change
CREATE TYPE edit_note_status AS ENUM ('deleted', 'edited');
CREATE TABLE edit_note_change
(
id SERIAL, -- PK
status edit_note_status,
edit_note INTEGER NOT NULL, -- references edit_note.id
changing_editor INTEGER NOT NULL, -- references editor.id
change_time TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
old_note TEXT NOT NULL,
new_note TEXT NOT NULL,
reason TEXT NOT NULL DEFAULT '',
);
@reosarevok
Copy link
Author

Ok, we considered that as an option but wasn't sure if needed, but I guess it can't hurt :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment