CLI: Wrong transformer option in cli/cmd/sync_v2.go
File: cli/cmd/sync_v2.go:34
Problem: In the v2→v3 append-mode path, WithRemovePKs() is called twice instead of WithRemovePKs() + WithRemoveUniqueConstraints(). This means unique constraints are silently preserved when they should be removed to match v3's schema expectations.
Current code:
opts = append(opts, transformer.WithRemovePKs(), transformer.WithRemovePKs())
Expected:
opts = append(opts, transformer.WithRemovePKs())
opts = append(opts, transformer.WithRemoveUniqueConstraints())
Fix: Replace the duplicate WithRemovePKs() call with WithRemoveUniqueConstraints().
Reproduction
- Configure a v2 source plugin with a v3 destination in append mode (via
v2-to-v3 migration path).
- Run sync — unique constraints from v2 tables are preserved in the destination.
- These constraints can cause conflicts/errors on subsequent writes since v3 destinations don't expect them.
CLI: Wrong transformer option in
cli/cmd/sync_v2.goFile:
cli/cmd/sync_v2.go:34Problem: In the v2→v3 append-mode path,
WithRemovePKs()is called twice instead ofWithRemovePKs()+WithRemoveUniqueConstraints(). This means unique constraints are silently preserved when they should be removed to match v3's schema expectations.Current code:
Expected:
Fix: Replace the duplicate
WithRemovePKs()call withWithRemoveUniqueConstraints().Reproduction
v2-to-v3migration path).