CREATE TABLE IF NOT EXISTS facebook_comment_reply_queue (
 id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
 group_name VARCHAR(300) NOT NULL,
 group_url VARCHAR(500) NOT NULL,
 post_url VARCHAR(700) NOT NULL,
 author_label VARCHAR(190) NULL,
 comment_text TEXT NOT NULL,
 proposed_reply TEXT NOT NULL,
 selection_reason VARCHAR(500) NOT NULL,
 status ENUM('selected','validated','processed','dismissed') NOT NULL DEFAULT 'selected',
 created_at DATETIME NOT NULL,
 updated_at DATETIME NOT NULL,
 UNIQUE KEY comment_source(post_url(190),author_label,comment_text(190)),
 INDEX comment_reply_status(status,created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
