-- Migration script to update default_country_denominations to use currency codes
-- This fixes the mismatch between business_country table and default_country_denominations table

-- Update country_code to use currency_code for all denominations
UPDATE `default_country_denominations` SET `country_code` = 'PHP' WHERE `country_code` = 'PHL';
UPDATE `default_country_denominations` SET `country_code` = 'USD' WHERE `country_code` = 'USA';
UPDATE `default_country_denominations` SET `country_code` = 'EUR' WHERE `country_code` = 'EUR'; -- Already correct
UPDATE `default_country_denominations` SET `country_code` = 'GBP' WHERE `country_code` = 'GBR';
UPDATE `default_country_denominations` SET `country_code` = 'JPY' WHERE `country_code` = 'JPN';
UPDATE `default_country_denominations` SET `country_code` = 'KWD' WHERE `country_code` = 'KWT';
UPDATE `default_country_denominations` SET `country_code` = 'SGD' WHERE `country_code` = 'SGP';
UPDATE `default_country_denominations` SET `country_code` = 'MYR' WHERE `country_code` = 'MYS';
UPDATE `default_country_denominations` SET `country_code` = 'IDR' WHERE `country_code` = 'IDN';
UPDATE `default_country_denominations` SET `country_code` = 'THB' WHERE `country_code` = 'THA';
UPDATE `default_country_denominations` SET `country_code` = 'VND' WHERE `country_code` = 'VNM';
UPDATE `default_country_denominations` SET `country_code` = 'KRW' WHERE `country_code` = 'KOR';
UPDATE `default_country_denominations` SET `country_code` = 'CNY' WHERE `country_code` = 'CHN';
UPDATE `default_country_denominations` SET `country_code` = 'INR' WHERE `country_code` = 'IND';
UPDATE `default_country_denominations` SET `country_code` = 'AUD' WHERE `country_code` = 'AUS';
UPDATE `default_country_denominations` SET `country_code` = 'NZD' WHERE `country_code` = 'NZL';
UPDATE `default_country_denominations` SET `country_code` = 'CAD' WHERE `country_code` = 'CAN';
UPDATE `default_country_denominations` SET `country_code` = 'MXN' WHERE `country_code` = 'MEX';
UPDATE `default_country_denominations` SET `country_code` = 'CHF' WHERE `country_code` = 'CHE';
UPDATE `default_country_denominations` SET `country_code` = 'SEK' WHERE `country_code` = 'SWE';
UPDATE `default_country_denominations` SET `country_code` = 'NOK' WHERE `country_code` = 'NOR';
UPDATE `default_country_denominations` SET `country_code` = 'DKK' WHERE `country_code` = 'DNK';
UPDATE `default_country_denominations` SET `country_code` = 'AED' WHERE `country_code` = 'ARE';
UPDATE `default_country_denominations` SET `country_code` = 'SAR' WHERE `country_code` = 'SAU';
UPDATE `default_country_denominations` SET `country_code` = 'QAR' WHERE `country_code` = 'QAT';
UPDATE `default_country_denominations` SET `country_code` = 'BHD' WHERE `country_code` = 'BHR';
UPDATE `default_country_denominations` SET `country_code` = 'OMR' WHERE `country_code` = 'OMN';
UPDATE `default_country_denominations` SET `country_code` = 'ILS' WHERE `country_code` = 'ISR';
UPDATE `default_country_denominations` SET `country_code` = 'TRY' WHERE `country_code` = 'TUR';
UPDATE `default_country_denominations` SET `country_code` = 'ZAR' WHERE `country_code` = 'ZAF';
UPDATE `default_country_denominations` SET `country_code` = 'EGP' WHERE `country_code` = 'EGY';
UPDATE `default_country_denominations` SET `country_code` = 'NGN' WHERE `country_code` = 'NGA';
UPDATE `default_country_denominations` SET `country_code` = 'BRL' WHERE `country_code` = 'BRA';
UPDATE `default_country_denominations` SET `country_code` = 'ARS' WHERE `country_code` = 'ARG';
UPDATE `default_country_denominations` SET `country_code` = 'CLP' WHERE `country_code` = 'CHL';
UPDATE `default_country_denominations` SET `country_code` = 'COP' WHERE `country_code` = 'COL';
UPDATE `default_country_denominations` SET `country_code` = 'PEN' WHERE `country_code` = 'PER'; 