From c8a5b342fde3e7afe0d7f2835a2c5d7f8e71a658 Mon Sep 17 00:00:00 2001 From: voloshina Date: Fri, 10 Jan 2025 13:02:54 +0300 Subject: [PATCH] Update clickhouse engine --- database/clickhouse/clickhouse.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database/clickhouse/clickhouse.go b/database/clickhouse/clickhouse.go index d2b65c0ce..e71769273 100644 --- a/database/clickhouse/clickhouse.go +++ b/database/clickhouse/clickhouse.go @@ -248,7 +248,8 @@ func (ch *ClickHouse) ensureVersionTable() (err error) { ) Engine=%s`, ch.config.MigrationsTable, ch.config.MigrationsTableEngine) } - if strings.HasSuffix(ch.config.MigrationsTableEngine, "Tree") { + if strings.HasSuffix(ch.config.MigrationsTableEngine, "Tree") || + strings.Contains(ch.config.MigrationsTableEngine, "MergeTree") { query = fmt.Sprintf(`%s ORDER BY sequence`, query) }