Skip to content

Commit a13084b

Browse files
authored
Add AI-Generated schema migration comparison
Adds a schema migration tool comparison to aide in selecting the right tool for the job. Includes a list of websites used in the consideration of the matrix as sources.
1 parent f07b6b6 commit a13084b

1 file changed

Lines changed: 50 additions & 1 deletion

File tree

  • content/en/altinity-kb-setup-and-maintenance/schema-migration-tools

‎content/en/altinity-kb-setup-and-maintenance/schema-migration-tools/_index.md‎

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,58 @@ description: >
4242
* dbmate
4343
* [https://github.com/amacneil/dbmate#clickhouse](https://github.com/amacneil/dbmate#clickhouse)
4444

45-
Know more?
45+
Want to know more?
4646

4747
https://clickhouse.com/docs/knowledgebase/schema_migration_tools
4848

4949
Article on migrations in ClickHouse
5050
https://posthog.com/blog/async-migrations
51+
52+
<!-- The following is an AI Generated comparison with bibliography for reference -->
53+
## ClickHouse Schema Migration Tools — Comparison Matrix & Bibliography
54+
55+
### Comparison Matrix
56+
57+
| Tool | Ecosystem / Style | ClickHouse support level | Notable strengths | Gotchas / pitfalls |
58+
|------|-------------------|--------------------------|-------------------|---------------------|
59+
| **Atlas** | Go CLI + schema-as-code (HCL/SQL) | First-class support; official CH guide available | Declarative schema mgmt, CI/GitOps friendly, strong diff/plan/apply model | Requires live DB for schema inspection; some DB objects not fully supported; CH non-transactional DDL means no rollback; heavy CH mutations still risky |
60+
| **golang-migrate** | Go CLI/library, SQL migrations | Supported via ClickHouse drivers | Simple migration model, good for Go-native workflows | Connection issues (`driver: bad connection`); driver version mismatches; no CH-specific awareness (mutations, async ops) |
61+
| **Liquibase (+ liquibase-clickhouse)** | Java-based XML/YAML/SQL changesets | Community extension provides support | Mature tooling, rollback system, large ecosystem | liquibase-clickhouse plugin often outdated; JDBC driver compatibility problems; classpath setup complexity |
62+
| **Houseplant** | Python CLI, YAML migrations | Purpose-built for ClickHouse | CH-first design, YAML clarity, multi-environment mgmt | No async/backfill orchestration; young project; small ecosystem |
63+
| **ClickSuite** | Node/TypeScript CLI | Built specifically for ClickHouse | Multi-env YAML config, multi-statement support, dry-run, rollback | Very new; minimal production history; requires Node toolchain |
64+
| **Flyway (community plugin)** | Java CLI/library | Community plugin supports CH | Popular enterprise migration tool, structured versioning | Can re-apply migrations due to lack of CH locking; plugin behind CH versions; JDBC handler issues |
65+
| **Alembic (via clickhouse-sqlalchemy)** | Python ORM-centric migrations | Supported through SQLAlchemy dialect | Works well if using SQLAlchemy models; autogenerate possible | Autogenerate breakage reported; CH DDL non-transactional; ORM-bound workflow may not suit raw SQL teams |
66+
| **Bytebase** | Web UI + DevOps change management | Officially supports ClickHouse | GUI, reviews, policies, multi-env governance | CH support newer; still does not solve CH async/backfill limitations; requires running a server |
67+
| **Python CH tools (migrations-clickhouse, clickhouse-migrate, etc.)** | Python CLI | Community support | Lightweight options; multi-statement support (varies) | Some tools abandoned; metadata tables not replicated across clusters; must manage ops manually |
68+
| **phpMigrations** | PHP framework | Community support | Useful only in PHP-heavy ecosystems | Very little recent activity; outdated; CH DDL constraints still apply |
69+
| **dbmate** | Go binary, SQL migrations | Supported via CH drivers | Simple, portable, framework-agnostic | Metadata table not replicated in cluster setups; CH DDL non-transactional |
70+
71+
---
72+
73+
### Bibliography
74+
75+
- Altinity KB – Schema Migration Tools: https://kb.altinity.com/altinity-kb-setup-and-maintenance/schema-migration-tools/
76+
- Palark – Atlas Migration Article: https://palark.com/blog/atlas-for-mysql-postgresql-database-schema-migrations/
77+
- Atlas Supported Objects Documentation: https://atlasgo.io/blog/2024/05/06/supported-objects/
78+
- ClickHouse SQLAlchemy Docs (Non-Transactional DDL): https://clickhouse-sqlalchemy.readthedocs.io/en/latest/
79+
- Tinybird – ClickHouse Schema Migrations: https://www.tinybird.co/blog/clickhouse-schema-migrations
80+
- pyk.sh – golang-migrate ClickHouse Connection Issues: https://pyk.sh/blog/2024-02-15-fix-driver-bad-connection-in-golang-migrate-click-house/
81+
- golang-migrate Driver/Connection Issues (GitHub): https://github.com/golang-migrate/migrate/issues
82+
- liquibase-clickhouse Issues: https://github.com/MEDIARITHMICS/liquibase-clickhouse/issues
83+
- Liquibase + ClickHouse Configuration Blog: https://blog.it-incubator.eu/2023/08/05/how-to-create-clickhouse-db-schema-with-liquibase/
84+
- Houseplant Documentation: https://houseplant.readthedocs.io/en/latest/usage.html
85+
- June – Houseplant Migration Article: https://www.june.so/blog/houseplant-database-migrations-for-clickhouse
86+
- Houseplant Hacker News Discussion: https://news.ycombinator.com/item?id=42524493
87+
- ClickSuite Documentation: https://github.com/GamebeastGG/clicksuite
88+
- Flyway ClickHouse Plugin Issue (Missing Locking): https://github.com/flyway/flyway-community-db-support/issues/48
89+
- Flyway ClickHouse Version Incompatibility: https://productsupport.red-gate.com/hc/en-us/community/posts/24974494619933
90+
- Flyway JDBC Handler Issues: https://github.com/flyway/flyway/issues
91+
- Alembic + ClickHouse SQLAlchemy Docs: https://clickhouse-sqlalchemy.readthedocs.io/en/latest/
92+
- SQLAlchemy ClickHouse Autogenerate Issues: https://github.com/cloudflare/sqlalchemy-clickhouse/issues
93+
- Bytebase Supported Databases: https://www.bytebase.com/docs/introduction/supported-databases/
94+
- Bytebase ClickHouse Engine Request: https://github.com/bytebase/bytebase/issues/3082
95+
- clickhouse-migrations README: https://github.com/Infinidat/migrations-clickhouse
96+
- dbmate README & ClickHouse Notes: https://github.com/amacneil/dbmate
97+
- dbmate ClickHouse Replication Issue: https://github.com/amacneil/dbmate/issues/265
98+
- SMI2 PHP ClickHouse Migrations (Habr): https://habr.com/ru/post/331762/
99+

0 commit comments

Comments
 (0)