Skip to content
Discussion options

You must be logged in to vote

Shipped in v0.13.0 🎉

pip install -U clickhouse-migrations, add an optional {VERSION}_{name}.down.sql next to your migration, and run clickhouse-migrations down (--steps N / --to VERSION / --dry-run). Docs: the Rollbacks section in the README.

It stays deliberately naive — reversible changes roll back cleanly, destructive ones (data-losing drops, ALTER … DELETE/UPDATE mutations) are your responsibility, since ClickHouse has no transactional DDL.

Thanks for the nudge, @Zevrap-81 — this had been declined before (#36) and your question tipped it over.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by zifter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants