CREATE TABLE IF NOT EXISTS gift_idea_refresh_log (
  id INT AUTO_INCREMENT PRIMARY KEY,
  user_id INT NOT NULL,
  profile_id VARCHAR(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  week_start DATE NOT NULL,
  refresh_count INT NOT NULL DEFAULT 1,
  UNIQUE KEY uq_user_profile_week (user_id, profile_id, week_start),
  FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
