From 722a53b18a9057d0c93eed6f1bcbbb4455df4930 Mon Sep 17 00:00:00 2001 From: Giri Putra Date: Wed, 20 Nov 2024 16:31:26 +0700 Subject: [PATCH] Quick fix to prioritize bigint to avoid bigint being mapped to Int32 --- mysql_ch_replicator/converter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql_ch_replicator/converter.py b/mysql_ch_replicator/converter.py index e3e77bc..8a6d638 100644 --- a/mysql_ch_replicator/converter.py +++ b/mysql_ch_replicator/converter.py @@ -123,14 +123,14 @@ def convert_type(self, mysql_type, parameters): return 'Float32' if 'double' in mysql_type: return 'Float64' - if 'integer' in mysql_type or 'int(' in mysql_type: - if is_unsigned: - return 'UInt32' - return 'Int32' if 'bigint' in mysql_type: if is_unsigned: return 'UInt64' return 'Int64' + if 'integer' in mysql_type or 'int(' in mysql_type: + if is_unsigned: + return 'UInt32' + return 'Int32' if 'real' in mysql_type: return 'Float64' if mysql_type.startswith('time'):