CREATE TABLE IF NOT EXISTS editorial_channel_goals (
  id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  editorial_month_id BIGINT UNSIGNED NOT NULL,
  channel_slug VARCHAR(40) NOT NULL,
  target_posts SMALLINT UNSIGNED NOT NULL DEFAULT 0,
  actual_posts SMALLINT UNSIGNED NOT NULL DEFAULT 0,
  updated_at DATETIME NOT NULL,
  UNIQUE KEY month_channel_unique(editorial_month_id,channel_slug),
  FOREIGN KEY(editorial_month_id) REFERENCES editorial_months(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
