diff --git a/mysql_ch_replicator/clickhouse_api.py b/mysql_ch_replicator/clickhouse_api.py index 011bc4a..510a368 100644 --- a/mysql_ch_replicator/clickhouse_api.py +++ b/mysql_ch_replicator/clickhouse_api.py @@ -119,7 +119,7 @@ def create_table(self, structure: TableStructure, additional_indexes: list | Non 'partition_by': partition_by, 'indexes': indexes, }) - print(" === query:", query) + logger.debug(f'create table query: {query}') self.execute_command(query) def insert(self, table_name, records, table_structure: TableStructure = None): diff --git a/mysql_ch_replicator/converter.py b/mysql_ch_replicator/converter.py index b762777..b9b7273 100644 --- a/mysql_ch_replicator/converter.py +++ b/mysql_ch_replicator/converter.py @@ -520,6 +520,8 @@ def parse_mysql_table_structure(self, create_statement, required_table_name=None continue if line.lower().startswith('constraint'): continue + if line.lower().startswith('fulltext'): + continue if line.lower().startswith('primary key'): # Define identifier to match column names, handling backticks and unquoted names identifier = (Suppress('`') + Word(alphas + alphanums + '_') + Suppress('`')) | Word( diff --git a/test_mysql_ch_replicator.py b/test_mysql_ch_replicator.py index 3b9999c..589709a 100644 --- a/test_mysql_ch_replicator.py +++ b/test_mysql_ch_replicator.py @@ -315,6 +315,8 @@ def test_runner(): name varchar(255), age int, rate decimal(10,4), + KEY `IDX_age` (`age`), + FULLTEXT KEY `IDX_name` (`name`), PRIMARY KEY (id) ); ''')