Skip to content

Commit

Permalink
Remove cbs param from StartDDLOperations
Browse files Browse the repository at this point in the history
It was passed to each `op.Start` but never used otherwise.
  • Loading branch information
andrew-farries committed Feb 11, 2025
1 parent a3d4638 commit eca7e41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/roll/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

// Start will apply the required changes to enable supporting the new schema version
func (m *Roll) Start(ctx context.Context, migration *migrations.Migration, cbs ...backfill.CallbackFn) error {
tablesToBackfill, err := m.StartDDLOperations(ctx, migration, cbs...)
tablesToBackfill, err := m.StartDDLOperations(ctx, migration)
if err != nil {
return err
}
Expand All @@ -28,7 +28,7 @@ func (m *Roll) Start(ctx context.Context, migration *migrations.Migration, cbs .

// StartDDLOperations performs the DDL operations for the migration. This does
// not include running backfills for any modified tables.
func (m *Roll) StartDDLOperations(ctx context.Context, migration *migrations.Migration, cbs ...backfill.CallbackFn) ([]*schema.Table, error) {
func (m *Roll) StartDDLOperations(ctx context.Context, migration *migrations.Migration) ([]*schema.Table, error) {
// check if there is an active migration, create one otherwise
active, err := m.state.IsActiveMigrationPeriod(ctx, m.schema)
if err != nil {
Expand Down Expand Up @@ -86,7 +86,7 @@ func (m *Roll) StartDDLOperations(ctx context.Context, migration *migrations.Mig
// execute operations
var tablesToBackfill []*schema.Table
for _, op := range migration.Operations {
table, err := op.Start(ctx, m.pgConn, latestSchema, m.sqlTransformer, newSchema, cbs...)
table, err := op.Start(ctx, m.pgConn, latestSchema, m.sqlTransformer, newSchema)
if err != nil {
errRollback := m.Rollback(ctx)

Expand Down

0 comments on commit eca7e41

Please sign in to comment.