> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-home-button.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Schema changes propagation support

> Page describing schema change types detectable by ClickPipes in the source tables

ClickPipes for MySQL can detect schema changes in the source tables and, in some cases, automatically propagate the changes to the destination tables. The way each DDL operation is handled is documented below:

[//]: # "TODO Extend this page with behavior on rename, data type changes, and truncate + guidance on how to handle incompatible schema changes."

| Schema Change Type                                                                  | Behaviour                                                                                                                                                                                |
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Adding a new column (`ALTER TABLE ADD COLUMN ...`)                                  | Propagated automatically. The new columns will be populated for all rows replicated after the schema change                                                                              |
| Adding a new column with a default value (`ALTER TABLE ADD COLUMN ... DEFAULT ...`) | Propagated automatically. The new columns will be populated for all rows replicated after the schema change, but existing rows won't show the default value without a full table refresh |
| Dropping an existing column (`ALTER TABLE DROP COLUMN ...`)                         | Detected, but **not** propagated. The dropped columns will be populated with `NULL` for all rows replicated after the schema change                                                      |

<Note>
  Column additions during snapshot are currently not supported. The suggested workaround is to perform snapshots before or after planned schema changes, or, if the ClickPipe is already failing, to manually add a column of the appropriate type to the destination table.
</Note>

<h3 id="mysql-5-limitations">
  MySQL 5.x limitations
</h3>

MySQL versions older than [8.0.1](https://dev.mysql.com/blog-archive/more-metadata-is-written-into-binary-log/) do not include full column metadata in the binlog (`binlog_row_metadata=FULL`), so ClickPipes tracks columns by ordinal position. This means:

* **Adding a column at the end** (`ALTER TABLE ADD COLUMN ...`) is supported.
* **Any DDL that shifts column positions** will cause the pipe to raise an error, because ordinal positions can no longer be reliably mapped. This includes:
  * `ALTER TABLE DROP COLUMN ...`
  * `ALTER TABLE ADD COLUMN ... AFTER ...` / `FIRST`
  * `ALTER TABLE MODIFY COLUMN ... AFTER ...` / `FIRST`
  * `ALTER TABLE CHANGE COLUMN ... AFTER ...` / `FIRST`

If you hit this error, you will need to resync the pipe.
