ALTER TABLE social.comment
ADD COLUMN internal bool NOT NULL DEFAULT FALSE
CONSTRAINT comment_internal_check CHECK (
    type = 'complaint' OR
    internal = FALSE
);

COMMENT ON COLUMN social.comment.internal IS
    'Shows whether this comment is for internal usage only.';

COMMENT ON CONSTRAINT comment_internal_check ON social.comment IS
    'Only complaints are allowed to be internal.';
