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

Add support to replicated clickhouse cluster #869

Open
jderusse opened this issue Dec 11, 2024 · 1 comment
Open

Add support to replicated clickhouse cluster #869

jderusse opened this issue Dec 11, 2024 · 1 comment

Comments

@jderusse
Copy link

When running goose on a clickhouse cluster, it fails to get the list of "previous" migrations (sometime querying a node a get a partial list of migrations)

Possible fix:

  1. change the engine
- ENGINE = MergeTree()
+ ENGINE = ReplicatedMergeTree('/clickhouse/{cluster}/tables/{shard}/{database}/{table}', '{replica}')

Not sure how this can be defined in goose via the CreateTable function (or should it be a new driver ? 🤔 )

@hiasr
Copy link

hiasr commented Dec 13, 2024

It could be possible to have it depend on an environment variable. To be able to support both replicated and non-replicated setups I do the following in my own migrations:

ENGINE = ${CH_ENGINE:-ReplicatedMergeTree}

Something similar could be possible here!

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

No branches or pull requests

3 participants