#1108·goose

Clickhouse Behavior with up-to

Author: safaci2000Created Aug 12, 2026Updated Aug 12, 2026

I'm using goose to manage my Clickhouse schema.

./goose -dir db/migrations clickhouse "clickhouse://admin:secret@clickhouse-staging-west1:9440/default?secure=true&allow_suspicious_low_cardinality_types=1" up-to 20260812000004

Then schema gets applied but then:

sql
SELECT * FROM default.goose_db_version

SELECT *
FROM default.goose_db_version

Query id: b01559a4-9925-418f-90c5-fea9e3f6a01b

Ok.

0 rows in set. Elapsed: 0.002 sec.

No version is recorded , so obviously status etc don't work right. It would also try to re-apply all the previously applied SQL.

bash
./goose status -no-versioning
2026/08/12 13:38:58     Applied At                  Migration
2026/08/12 13:38:58     =======================================
2026/08/12 13:38:58     no versioning            -- 20260810000001_dictionaries_schema.sql
2026/08/12 13:38:58     no versioning            -- 20260811000001_ht_schema.sql
2026/08/12 13:38:58     no versioning            -- 20260811000002_mh_schema.sql
2026/08/12 13:38:58     no versioning            -- 20260811000003_sec_schema.sql
2026/08/12 13:38:58     no versioning            -- 20260811000004_monitoring_schema.sql
2026/08/12 13:38:58     no versioning            -- 20260812000001_sec_conn_staging.sql
2026/08/12 13:38:58     no versioning            -- 20260812000002_kafka_ht_host_albq_ht1.sql
2026/08/12 13:38:58     no versioning            -- 20260812000003_kafka_ht_host_albq_ht2.sql
2026/08/12 13:38:58     no versioning            -- 20260812000004_kafka_ht_host_anl221_ht1.sql
2026/08/12 13:38:58     no versioning            -- 20260814000001_ht_cleanup.sql
2026/08/12 13:38:58     no versioning            -- 20260814000002_sec_cleanup_dst_mv.sql
2026/08/12 13:38:58     no versioning            -- 20260814000003_cleanup_kafka_mv_albq_ht1.sql
2026/08/12 13:38:58     no versioning            -- 20260814000004_cleanup_kafka_mv_albq_ht2.sql
2026/08/12 13:38:58     no versioning            -- 20260814000005_cleanup_kafka_mv_anl221_ht1.sql
2026/08/12 13:38:58     no versioning            -- 20260814000006_ht_cleanup_teardown.sql
2026/08/12 13:38:58     no versioning            -- 20260814000007_sec_cleanup.sql
2026/08/12 13:38:58     no versioning            -- 20260815000001_sec_cleanup_src_mv.sql

I'm running:

./goose --version
goose version: v3.27.3
root@clickhouse-staging-west1:/etc/clickhouse-server/migrations# uname -a
Linux clickhouse-staging-west1.es.net 5.15.0-187-generic #197-Ubuntu SMP Fri Jul 17 19:17:01 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux

Update:

There's an additional issue, if I try to run: goose up I get an error:

./goose up
2026/08/12 13:56:26 goose run: no next version found

In order to get around that, I need to to a drop table default.goose_db_version;