diff --git a/dialect.go b/dialect.go index b9b6245e5..da9343918 100644 --- a/dialect.go +++ b/dialect.go @@ -298,7 +298,9 @@ func (m ClickHouseDialect) createVersionTableSQL() string { is_applied UInt8, date Date default now(), tstamp DateTime default now() - ) Engine = MergeTree(date, (date), 8192)`, TableName()) + ) + ENGINE = MergeTree() + ORDER BY (date)`, TableName()) } func (m ClickHouseDialect) dbVersionQuery(db *sql.DB) (*sql.Rows, error) { diff --git a/internal/testdb/clickhouse.go b/internal/testdb/clickhouse.go index 62fc8bfd7..f0ee13a12 100644 --- a/internal/testdb/clickhouse.go +++ b/internal/testdb/clickhouse.go @@ -16,7 +16,7 @@ import ( const ( // https://hub.docker.com/r/clickhouse/clickhouse-server/ CLICKHOUSE_IMAGE = "clickhouse/clickhouse-server" - CLICKHOUSE_VERSION = "22.6-alpine" + CLICKHOUSE_VERSION = "22.9-alpine" CLICKHOUSE_DB = "clickdb" CLICKHOUSE_USER = "clickuser"