How CloudQuery handles changes to existing tables | CloudQuerySkip to Content

How CloudQuery handles changes to existing tables

CloudQuery handles schema changes by avoiding breaking changes and adding columns instead, because users commonly build views on top of synced tables. Migration strategies are implemented in the destination integrations, as source integrations are database agnostic and send back JSON objects.

CloudQuery has two modes of migrating to a new schema, safe which is supported by all destinations, and forced which is only supported by ClickHouse, MySQL, PostgreSQL, MSSQL and SQLite at the moment.

The safe mode is the default and will not run migrations that would result in data loss, and will print an error instead. The forced mode will run migrations that may result in data loss and the migration should always succeed without errors.

Schema changes that require data loss only succeed with forced mode:

Schema changes that don’t require data loss pass in both modes:

Next Steps

Was this page helpful?

Last updated on