Skip to content

Commit 2b3ede7

Browse files
authored
fix(main): Don't migrate in new plugins if --no-migrate is used (cloudquery#12962)
1 parent 87875f7 commit 2b3ede7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cli/cmd/sync_v3.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
)
2222

2323
// nolint:dupl
24-
func syncConnectionV3(ctx context.Context, sourceClient *managedplugin.Client, destinationsClients managedplugin.Clients, sourceSpec specs.Source, destinationSpecs []specs.Destination, uid string, _ bool) error {
24+
func syncConnectionV3(ctx context.Context, sourceClient *managedplugin.Client, destinationsClients managedplugin.Clients, sourceSpec specs.Source, destinationSpecs []specs.Destination, uid string, noMigrate bool) error {
2525
var mt metrics.Metrics
2626
var exitReason = ExitReasonStopped
2727
tables := make(map[string]bool, 0)
@@ -197,6 +197,9 @@ func syncConnectionV3(ctx context.Context, sourceClient *managedplugin.Client, d
197197
}
198198
}
199199
case *plugin.Sync_Response_MigrateTable:
200+
if noMigrate {
201+
continue
202+
}
200203
sc, err := plugin.NewSchemaFromBytes(m.MigrateTable.Table)
201204
if err != nil {
202205
return err

0 commit comments

Comments
 (0)