CREATE TABLE IF NOT EXISTS message_generate_log (
  id INT AUTO_INCREMENT PRIMARY KEY,
  user_id INT NOT NULL,
  profile_id VARCHAR(36) NOT NULL,
  week_start DATE NOT NULL,
  generate_count INT NOT NULL DEFAULT 1,
  UNIQUE KEY uq_msg_gen_user_profile_week (user_id, profile_id, week_start)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
