Changing column types in a large ClickHouse table is serious work. Apparently, it's also an excellent opportunity to discover how many unrelated objects you can rebuild manually.
The change, without the theater
Consider a large ClickHouse table fed by ingestion jobs and managed through a declarative schema tool. Changing several column types may require careful planning, but that is not an invitation to rebuild everything in sight.
The conversions were concrete:
DateTime → DateTime64(3). Existing timestamps acquire millisecond precision with.000; aDateTimevalue does not suddenly become unparseable because its type gains precision.String → UInt8. Empty strings and invalid values need to be handled before conversion. That's a data-cleanup problem, not a reason to improvise the rest of the schema.String → LowCardinality(String). The type change itself is straightforward; normalizing the values, if needed, is a separate concern.
If ingestion can be paused for a maintenance window, one option is to clean invalid values in bounded batches or partitions, change the column types in place, wait for mutations to complete, validate, and restart.
On large tables, ClickHouse mutations can rewrite substantial amounts of data. Would that fit the maintenance window? Only a benchmark could answer. But it was a real option to evaluate, not a fantasy to dismiss in favor of a more theatrical plan.
A new table is a strategy. Recreating everything is a hobby.
Another valid route is a replacement table: create it with the desired schema, copy data in batches using INSERT ... SELECT, and switch table names.
That approach can be perfectly reasonable. It allows the new data to be prepared and checked before the cutover, and it can leave the original table available for recovery. There is no universal rule that in-place ALTER is better.
A common failure mode appears at cutover. Materialized views may still reference the old source table. Their bindings need attention, but manually recreating views and aggregate targets from old database DDL can bypass the current declarative models.
Not every dependent aggregate table needed to be recreated merely because the source table changed. And when an object is already defined in a declarative model, reconstructing it from a historical SHOW CREATE result is a curious choice.
A model is supposed to be the source of truth. Reconstructing the schema from an older snapshot creates a second one.
One schema, two realities
If manually copied definitions differ from the current models, the stored schema can diverge from the declared one even when the data migration succeeds.
That's the hidden cost of manual DDL in a model-managed system. The migration might move the data correctly while quietly creating a second authority for what the schema is supposed to look like.
The next engineer then sees a migration plan containing operations unrelated to the requested change and has to determine whether they are necessary, harmless, or dangerous. A plan that includes unexplained historical debris stops being a reliable review artifact.
Not every recurring operation has the same cause. Type-comparison quirks can treat equivalent types as different, and objects missing from migration-tool state can reappear in plans. Different causes, the same operational noise. Blaming every symptom on one change would be convenient, but technically lazy.
Green is a color, not a postcondition
Such operations can report success and still appear in later plans. A CREATE IF NOT EXISTS can succeed without creating anything. A type comparison can keep proposing a change even when the database already represents the intended type.
Successful execution is not proof of convergence. After an exceptional migration, a useful test is to generate another plan with no model changes. It should be empty. If it isn't, investigate before teaching the entire team to ignore the noise.
Two defensible paths are a measured in-place migration during an ingestion pause, or a replacement-table approach that keeps dependent objects under their declarative owner and validates the final state. Neither path required blindly recreating every nearby object by hand.
The risk isn't choosing a new table. It's adding manual steps the tooling could have managed, then treating a green deployment as the end of the story.
The migration succeeded. The need to migrate survived.