Skip to content

Commit 1e8af89

Browse files
authored
Ignore fulltext key (#43)
1 parent 6df5da8 commit 1e8af89

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

mysql_ch_replicator/clickhouse_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def create_table(self, structure: TableStructure, additional_indexes: list | Non
119119
'partition_by': partition_by,
120120
'indexes': indexes,
121121
})
122-
print(" === query:", query)
122+
logger.debug(f'create table query: {query}')
123123
self.execute_command(query)
124124

125125
def insert(self, table_name, records, table_structure: TableStructure = None):

mysql_ch_replicator/converter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,8 @@ def parse_mysql_table_structure(self, create_statement, required_table_name=None
520520
continue
521521
if line.lower().startswith('constraint'):
522522
continue
523+
if line.lower().startswith('fulltext'):
524+
continue
523525
if line.lower().startswith('primary key'):
524526
# Define identifier to match column names, handling backticks and unquoted names
525527
identifier = (Suppress('`') + Word(alphas + alphanums + '_') + Suppress('`')) | Word(

test_mysql_ch_replicator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ def test_runner():
315315
name varchar(255),
316316
age int,
317317
rate decimal(10,4),
318+
KEY `IDX_age` (`age`),
319+
FULLTEXT KEY `IDX_name` (`name`),
318320
PRIMARY KEY (id)
319321
);
320322
''')

0 commit comments

Comments
 (0)