CREATE TYPE comment_visibility AS ENUM ( 'public', 'maintainers', 'private' ); CREATE TABLE IF NOT EXISTS issues ( id SERIAL PRIMARY KEY, repository TEXT NOT NULL, author TEXT NOT NULL, creation_date INTEGER NOT NULL, issue_name TEXT NOT NULL, contents TEXT ); CREATE TABLE IF NOT EXISTS issue_comments ( id SERIAL PRIMARY KEY, issue INTEGER NOT NULL REFERENCES issues(id), author TEXT NOT NULL, visibility comment_visibility NOT NULL, contents TEXT );