File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -247,9 +247,11 @@ func (ch *ClickHouse) ensureVersionTable() (err error) {
247247 sequence UInt64
248248 ) Engine=%s` , ch .config .MigrationsTable , ch .config .MigrationsTableEngine )
249249 }
250-
251- if strings .Contains (ch .config .MigrationsTableEngine , "Tree" ) {
252- query = fmt .Sprintf (`%s PRIMARY KEY sequence ORDER BY sequence` , query )
250+ // fix: https://github.com/golang-migrate/migrate/pull/1169/commits/16cb3137a3e6e2e11de04585b66de26a584b6b8c
251+ // if strings.Contains(ch.config.MigrationsTableEngine, "Tree") {
252+ // query = fmt.Sprintf(`%s PRIMARY KEY sequence ORDER BY sequence`, query)
253+ if strings .HasSuffix (ch .config .MigrationsTableEngine , "Tree" ) {
254+ query = fmt .Sprintf (`%s ORDER BY sequence` , query )
253255 }
254256
255257 if _ , err := ch .conn .Exec (query ); err != nil {
You can’t perform that action at this time.
0 commit comments