Skip to content

Commit

Permalink
Update deprecated query in createVersionTableSQL for new ClickHouse v…
Browse files Browse the repository at this point in the history
…ersions since 22.7 (#408)
  • Loading branch information
Systemnick authored Oct 21, 2022
1 parent 1c15215 commit f30eb6d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/testdb/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f30eb6d

Please sign in to comment.