Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automigration doesn't work with table on cluster mode #113

Open
EasonXeu opened this issue Jun 28, 2023 · 2 comments
Open

Automigration doesn't work with table on cluster mode #113

EasonXeu opened this issue Jun 28, 2023 · 2 comments
Assignees

Comments

@EasonXeu
Copy link

EasonXeu commented Jun 28, 2023

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

@EasonXeu EasonXeu changed the title Automigration doesnt Automigration doesn't work with table on cluster mode Jun 28, 2023
@EasonXeu
Copy link
Author

EasonXeu commented Jun 28, 2023

I raised a PR here to fix this issue.

#117

@EasonXeu
Copy link
Author

@jinzhu please help to review and merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants