Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions schema/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ type Table struct {
// This relates to the CloudQuery plugin itself, and should not be confused
// with whether the table makes use of a paid API or not.
IsPaid bool `json:"is_paid"`

// IgnorePKComponentsMismatchValidation is a flag that indicates if the table should skip validating usage of both primary key components and primary keys
IgnorePKComponentsMismatchValidation bool `json:"ignore_pk_components_mismatch_validation"`
}

var (
Expand Down
2 changes: 1 addition & 1 deletion transformers/tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TransformTables(tables schema.Tables) error {
if err := TransformTables(table.Relations); err != nil {
return err
}
if len(table.PrimaryKeys()) > 0 && len(table.PrimaryKeyComponents()) > 0 {
if !table.IgnorePKComponentsMismatchValidation && len(table.PrimaryKeys()) > 0 && len(table.PrimaryKeyComponents()) > 0 {
return fmt.Errorf("primary keys and primary key components cannot both be set for table %q", table.Name)
}
}
Expand Down
Loading