File tree 1 file changed +5
-3
lines changed
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) {
247
247
sequence UInt64
248
248
) Engine=%s` , ch .config .MigrationsTable , ch .config .MigrationsTableEngine )
249
249
}
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 )
253
255
}
254
256
255
257
if _ , err := ch .conn .Exec (query ); err != nil {
You can’t perform that action at this time.
0 commit comments