Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mysql_ch_replicator/clickhouse_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 2 additions & 0 deletions mysql_ch_replicator/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions test_mysql_ch_replicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
);
''')
Expand Down