Skip to content

Commit

Permalink
Bugfix/disable add new col for protondb and display release version c…
Browse files Browse the repository at this point in the history
…orrectly (slingdata-io#9)

* disable: added new col for proton db

* revert ldflgas change to dispaly version info correctly.

Rationale:
If we don't revert this change, we would need to perform a global search and replace:
s/slingdata-io\/sling-cli/timeplus-io\/sling-cli/g
  • Loading branch information
yokofly authored Oct 12, 2024
1 parent 029e23e commit 4d365e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ builds:
- amd64
- arm64
ldflags:
- "-X 'github.com/timeplus-io/sling-cli/core.Version={{.Version}}'"
- "-X 'github.com/slingdata-io/sling-cli/core.Version={{.Version}}'"

archives:
- format: zip
Expand Down
4 changes: 2 additions & 2 deletions core/sling/task_run_write.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (t *TaskExecution) WriteToDb(cfg *Config, df *iop.Dataflow, tgtConn databas
}

// set OnColumnAdded
if *cfg.Target.Options.AddNewColumns {
if *cfg.Target.Options.AddNewColumns && cfg.Target.Type != dbio.TypeDbProton {
df.OnColumnAdded = func(col iop.Column) error {

// sleep to allow transaction to close
Expand Down Expand Up @@ -427,7 +427,7 @@ func (t *TaskExecution) WriteToDb(cfg *Config, df *iop.Dataflow, tgtConn databas
}

if !created && cfg.Mode != FullRefreshMode {
if *cfg.Target.Options.AddNewColumns {
if *cfg.Target.Options.AddNewColumns && cfg.Target.Type != dbio.TypeDbProton {
ok, err := tgtConn.AddMissingColumns(targetTable, sample.Columns)
if err != nil {
return cnt, g.Error(err, "could not add missing columns")
Expand Down

0 comments on commit 4d365e7

Please sign in to comment.