-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
rename board => column in projects #20985
rename board => column in projects #20985
Conversation
Wow that's a lot of work for something that seems so simple. Thanks for doing this. |
I was quite surprised by that as well and therefore I would definitely only change the board term in this PR. |
Does this change the API in any way? I seem mention of "board" as "project" in the permissions page, as one of the "units": https://docs.gitea.io/en-us/permissions/ |
Luckily the routes do not contain the term board and dont need to be changed as far as I can tell atm. I saw that permission init, but it should be still the same as well. |
…rd-naming-is-13802
|
||
type ( | ||
// BoardType is used to represent a project board type | ||
BoardType uint8 |
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.
ColumnType?
@@ -77,13 +77,13 @@ | |||
</div> | |||
<div class="ui container fluid padded" id="project-board"> | |||
|
|||
<div class="board"> | |||
{{range $board := .Boards}} | |||
<div class="project-board"> |
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.
project-column ?
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 already use project-column
in line 83 for an actual column. This is the div
containing all columns, so I guess project-board
is to wrong.
BoardType uint8 | ||
|
||
// Columns is a list of all project columns in a repository | ||
Columns []*Column |
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.
ColumnList
maybe a better name since all of other places use xxxList
.
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.
will change that
models/migrations/v226.go
Outdated
return err | ||
} | ||
|
||
if _, err := sess.Exec("ALTER TABLE `project_issue` RENAME COLUMN `project_board_id` TO `project_column_id`;"); err != 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.
in migrations.go there is a helper to rename columns because in some dbs (sqlite) renames don't actually work as expected
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.
Do you mean recreateTable
? I am not sure how to use it, so it copies over all data from the old to the new column 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.
Seems like there was no helper for renaming yet, so I added two tiny ones.
…b.com/anbraten/gitea into anbraten/kanban-board-naming-is-13802
Since #22767 is merged and there are so many conflicts here, I think creating a new PR to do the left refactor is easier than resolve all the conflicts. |
closes #13802
Changes