-
Notifications
You must be signed in to change notification settings - Fork 105
Return list of DBAction
from Start
#944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3e741e2
to
1968e8f
Compare
1968e8f
to
9feb18a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple of comments 👍
pkg/roll/execute.go
Outdated
@@ -101,15 +101,20 @@ func (m *Roll) StartDDLOperations(ctx context.Context, migration *migrations.Mig | |||
// execute operations | |||
job := backfill.NewJob(m.schema, versionSchemaName) | |||
for _, op := range migration.Operations { | |||
task, err := op.Start(ctx, m.logger, m.pgConn, newSchema) | |||
actions, task, err := op.Start(ctx, m.logger, m.pgConn, newSchema) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename task
to something more specific like backfillTask
.
Co-authored-by: Andrew Farries <andyrb@gmail.com>
Merging this branch changes the coverage (1 decrease, 1 increase)
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
This PR returns adds a new return value to
Start
to return the list ofDBActions
. However, returning 3 values is too many, so in a follow-up PR I am combining the list ofDBActions
andbackfill.Task
into the same data structure. The name is pending, my ideas so farStartStep
orStartOperation
. If you have a better name, I am open to using them.New data structure in a follow-up PR: