We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 555501f commit 16cb313Copy full SHA for 16cb313
database/clickhouse/clickhouse.go
@@ -248,8 +248,8 @@ func (ch *ClickHouse) ensureVersionTable() (err error) {
248
) Engine=%s`, ch.config.MigrationsTable, ch.config.MigrationsTableEngine)
249
}
250
251
- if strings.HasSuffix(ch.config.MigrationsTableEngine, "Tree") {
252
- query = fmt.Sprintf(`%s ORDER BY sequence`, query)
+ if strings.Contains(ch.config.MigrationsTableEngine, "Tree") {
+ query = fmt.Sprintf(`%s PRIMARY KEY sequence ORDER BY sequence`, query)
253
254
255
if _, err := ch.conn.Exec(query); err != nil {
0 commit comments