Fix issue #1730 - Now all actions are modified - #1744
Closed
DblK wants to merge 1 commit into
Closed
Conversation
lunny
requested changes
May 18, 2017
| Cols("act_user_name", "repo_user_name"). | ||
| Where("act_user_id = ?", id). | ||
| Update(ac) | ||
| log.Info("%v", err) |
| ActUserName: newUserName, | ||
| } | ||
| _, err := x. | ||
| Cols("act_user_name", "repo_user_name"). |
Member
There was a problem hiding this comment.
Should only update act_user_name. And add another SQL update action set repo_user_name=? where repo_user_name=?
Member
Author
There was a problem hiding this comment.
It won't be possible because I don't have the oldUserName, you want me to add it to the function?
I am not sure to understand how you want me to code it.
Member
|
And a migration should be added |
Member
Author
|
What migration should I do? I have a hard time coding the migration but I can try to do it. |
Member
|
Maybe you should add a migration like the below. x.Exec("update action set act_user_name = (select name from user where user.id = action.act_user_id)") |
Merged
Member
Author
Member
|
@DblK I agree with you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Action in Dashboard are renamed when the user is renamed. This fix #1730.