diff --git a/scripts/multi_currency_migration.sql b/scripts/multi_currency_migration.sql index 5f0d7a2..252d8b5 100644 --- a/scripts/multi_currency_migration.sql +++ b/scripts/multi_currency_migration.sql @@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS accounting.currency ( decimal_places SMALLINT DEFAULT 2, is_base VARCHAR(1) DEFAULT '0', status VARCHAR(16) DEFAULT 'active' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT IGNORE INTO accounting.currency (id, name, symbol, decimal_places, is_base, status) VALUES ('CNY', '人民币', '¥', 2, '1', 'active'), @@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS accounting.exchange_rate ( effective_date DATE NOT NULL, updated_at DATETIME DEFAULT NULL, UNIQUE KEY idx_pair_date (from_currency, to_currency, effective_date) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT IGNORE INTO accounting.exchange_rate (id, from_currency, to_currency, buy_rate, sell_rate, mid_rate, effective_date) VALUES ('er_usd_cny', 'USD', 'CNY', 7.150000, 7.250000, 7.200000, '2025-01-01'),