-- Migration to add EUR-based referral points settings
-- This makes referral points universal across currencies by using EUR as the base
-- Date: 2025-01-XX

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";

-- Add EUR-based referral point settings
INSERT INTO `referral_settings` (`setting_key`, `setting_value`, `description`) VALUES
('points_per_eur', '10', 'Number of referral points earned per 1 EUR purchase by referred user'),
('points_to_eur', '100', 'Number of referral points required to redeem 1 EUR discount')
ON DUPLICATE KEY UPDATE 
  `description` = VALUES(`description`);

COMMIT;


