CREATE TYPE msgtype AS ENUM ( 'posting', 'approval' );
DROP TABLE IF EXISTS messages;
CREATE TABLE messages (
msg_id serial primary key,
replying_to INTEGER,
key_id INTEGER,
FOREIGN KEY(key_id) REFERENCES public_keys(key_id),
msgtype msgtype,
msgtext TEXT NOT NULL,
nonce VARCHAR(100) NOT NULL,
signature VARCHAR(200) NOT NULL,
submitter VARCHAR(100) NOT NULL
);
