From f9cb644e072832c0f8d518afac5130e893adb55b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 10 Jul 2026 11:40:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20currency/exchange=5Frate=20DDL=20?= =?UTF-8?q?=E5=8A=A0=20utf8mb4=5Funicode=5Fci=20=E9=98=B2=E6=AD=A2=20colla?= =?UTF-8?q?tion=20mismatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/multi_currency_migration.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'),