1.1.0a1 — Alpha Preview (Alembic Integration)
This is an alpha preview of the upcoming 1.1.0 release, published from the joe/alembic-integration-work branch for early testing of the new SQLAlchemy and Alembic features. It includes everything in 1.0.0rc2 plus the additions listed below.
Installation
Pre-releases are not installed by default. Pin the exact version:
pip install clickhouse-connect==1.1.0a1
# To use the new Alembic integration:
pip install "clickhouse-connect[alembic]==1.1.0a1"What's new in this preview
- Alembic migration support: Full Alembic integration for ClickHouse schema migrations: autogeneration from SQLAlchemy metadata, upgrade/downgrade lifecycle, and round-tripping of ClickHouse-specific DDL. Engines (
MergeTree,ReplacingMergeTree, etc.) and Dictionaries are preserved through the migration lifecycle. Supported operations include create/drop table, add/alter/drop/rename column, type and nullability changes, defaults, comments,IF EXISTSguards, column placement withAFTER, and operation-levelclickhouse_settings. SeeWORKED_EXAMPLE.mdfor an end-to-end walkthrough. - ClickHouse
Dictionarytype support in SQLAlchemy and Alembic. - New SQLAlchemy chainables:
PREWHERE,LIMIT BY, and lambda expressions as Select constructs for ClickHouse-specific query shapes. - Multi-column
ARRAY JOINlabel preservation — aliases now survive through compilation, fixing label loss with parallel array expansion. - Migration shim for
clickhouse-sqlalchemyusers — newcc_sqlalchemy.typesandcc_sqlalchemy.enginesimport-compatible modules. SeeMIGRATING_FROM_CLICKHOUSE_SQLALCHEMY.md. - SQLAlchemy 1.4 and 2.x compatibility improvements across the dialect and DDL compiler paths.
- Inspector: cloud quirk reflection fixes for ClickHouse Cloud-specific schema reflection edge cases.
- DDL compiler: better handling of nested container types and Tuple adaptation.
- Alembic autogenerated migrations rendering enum types (including nested container types) with the correct ClickHouse-compatible representation.
Feedback
This alpha exists to shake out the new SQLAlchemy/Alembic surface before it ships in 1.1.0 final. Please file issues at https://github.com/ClickHouse/clickhouse-connect/issues with the alembic or sqlalchemy label so they're easy to triage.
Full changelog
See CHANGELOG.md for the complete entry, plus everything inherited from 1.0.0rc2.