FreeSql icon indicating copy to clipboard operation
FreeSql copied to clipboard

ClickHouse PARTITION BY support in CodeFirst CREATE TABLE

Open wizzard0 opened this issue 8 months ago • 3 comments

For large clickhouse tables, partition key is essential. Currently there's no way to specify partition key (usually a function from the timestamp primary key column, like toYYYYMM(time)), and looking at the clickhouse provider there's no code that could insert the PARTITION BY clause in CREATE TABLE statement builder either.

Since the partition can be an arbitrary function, this calls for a new property in the TableAttribute, not ColumnAttribute

Thanks in advance!

wizzard0 avatar May 29 '24 20:05 wizzard0