Open EasonXeu opened 1 year ago
When I use gorm to operate the click house table which is running in the cluster mode, just like this:
database.db.Table(tableName).Set( "gorm:table_cluster_options", "on cluster hs_ch_cluster").AutoMigrate(&dto.User{})
The autoMigrate function is not working if we add new columns. I thought it is because the cluster clause is missing. The code is here.
The cluster clause is included in creating a table but is not included in adding a column. craeting table adding a column
And it seems that the issue exists for adding column, dropping column, and altering column
I raised a PR here to fix this issue.
https://github.com/go-gorm/clickhouse/pull/117
@jinzhu please help to review and merge
Description
When I use gorm to operate the click house table which is running in the cluster mode, just like this:
database.db.Table(tableName).Set( "gorm:table_cluster_options", "on cluster hs_ch_cluster").AutoMigrate(&dto.User{})
The autoMigrate function is not working if we add new columns. I thought it is because the cluster clause is missing. The code is here.
The cluster clause is included in creating a table but is not included in adding a column. craeting table adding a column
And it seems that the issue exists for adding column, dropping column, and altering column