-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 activity feed #1779
Fix activity feed #1779
Conversation
models/migrations/v34.go
Outdated
return "action" | ||
} | ||
|
||
func removeActionColumns(x *xorm.Engine) (err error) { |
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.
But this will not remove the column currently.
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 know, I made a note of it in the PR description. How does one remove columns with xorm?
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.
Not the best at xorm but you could still execute sql and pass a ALTER TABLE command
This will also drop #1744 |
It will be more easy/clean to remove :
and simply use |
@sapk Updated the migration, and took your suggestion about the fields for the |
Build timed out 😢 |
You could easely restart the build by doing a git commit --amend and pushing (with -f) the new commit ;-). |
Rebased onto master to retrigger build |
models/action_test.go
Outdated
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestAction_GetRepoPath(t *testing.T) { |
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.
How about add some new tests?
Preserve actions after user/repo name change
LGTM |
LGTM |
Preserve actions after user/repo name change. Fixes #1730.
Essentially removes the
act_user_name
,repo_user_name
, andrepo_name
columns from theaction
table (which can become stale when a user/repo changes name). There's really no point in having theact_user_name
column, since you have the load the user for the avatar link anyways.NOTE: I'm having some trouble getting the migration to work; if anyone knows how to drop columns with xorm, please help me out.