-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Fix issue #1730 - Now all actions are modified #1744
Conversation
Cols("act_user_name", "repo_user_name"). | ||
Where("act_user_id = ?", id). | ||
Update(ac) | ||
log.Info("%v", err) |
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.
err maybe nil
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.
I will remove this line
ActUserName: newUserName, | ||
} | ||
_, err := x. | ||
Cols("act_user_name", "repo_user_name"). |
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.
Should only update act_user_name
. And add another SQL update action set repo_user_name=? where repo_user_name=?
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.
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.
And a migration should be added |
What migration should I do? I have a hard time coding the migration but I can try to do it. |
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)") |
@DblK I agree with you. |
Action in Dashboard are renamed when the user is renamed. This fix #1730.