CREATE TABLE IF NOT EXISTS `campaigns_comments` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `campaign_id` INT(11) NOT NULL,
  `comment` TEXT NOT NULL,
  `date_add` DATE NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_campaign_comment_date` (`campaign_id`, `date_add`),
  KEY `idx_campaign_id` (`campaign_id`),
  CONSTRAINT `FK_campaigns_comments_campaigns` FOREIGN KEY (`campaign_id`) REFERENCES `campaigns` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
