-
Notifications
You must be signed in to change notification settings - Fork 105
Return DBActions
from Rollback
#929
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
7cea307
to
bee688d
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.
Would prefer to return nil
slices here and in Complete
if possible.
pkg/migrations/op_add_column.go
Outdated
l.LogOperationRollback(o) | ||
|
||
table := s.GetTable(o.Table) | ||
if table == nil { | ||
return TableDoesNotExistError{Name: o.Table} | ||
return []DBAction{}, TableDoesNotExistError{Name: o.Table} |
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.
can we return nil
slices rather than empty slices?
The same also applies to the error returns in the Complete
functions.
bee688d
to
7ad76b2
Compare
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 changes the signature of
Rollback
. From now on, it returns a list ofDBActions
.