AORM icon indicating copy to clipboard operation
AORM copied to clipboard

Table creation statements use deprecated MergeTree syntax

Open edwinRNDR opened this issue 1 year ago • 0 comments

When using newer clickhouse-server instances AORM fails to create tables because a deprecated statement syntax is used.

For example it uses CREATE TABLE tally_entity_table (date Date, tally_id Int32, trentity_id Int32, article_id Int32, region_id Int32) ENGINE = MergeTree(date, (date, tally_id, trentity_id), 8192) to create a table.

The documentation at https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree describes the new way to create tables.

In https://github.com/edwinRNDR/AORM/commit/db8ab6e109e566903ac3fa3e9df9424d506060a1 I fixed the syntax but I had to hardcode a partitioning function (toYYYYMMDD). I believe this function should be configurable in Engine.MergeTree().

edwinRNDR avatar Mar 06 '23 17:03 edwinRNDR