Skip to content

Commit

Permalink
Update clickhouse engine
Browse files Browse the repository at this point in the history
  • Loading branch information
voloshina committed Jan 10, 2025
1 parent c378583 commit c8a5b34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion database/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit c8a5b34

Please sign in to comment.