Skip to content

Support _cq_id-only PK mode #8474

@hermanschaaf

Description

@hermanschaaf

Some CloudQuery users have provided feedback that it is a maintenance burden on them when table PKs change, as this requires manual intervention on their part. We now support migrate_mode: forced, but this cannot always be applied. At the same time, they wish to benefit from improvements and non-breaking bugfixes. While we do our best to minimize breaking changes, this isn't always possible, and PKs are especially prone to this because the proper columns to use are often not documented and are subject to change.

An idea to help users in this situation is to provide an option to make the _cq_id column the only database-level PK column for all tables. The ID written to this column will then have to be a hash of the columns marked as part of the primary key in the table-level documentation. With such a mode, users will no longer be forced to perform costly migrations when PK fixes are done, but they may have duplicate data. Such duplicate data will be taken care of by overwrite-delete-stale mode, however. This mode could offer users a good compromise between schema stability and still getting updates and bugfixes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions