aboutsummaryrefslogtreecommitdiffstats
path: root/models/migrations/v1_22
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-05-27 16:59:54 +0800
committerGitHub <noreply@github.com>2024-05-27 08:59:54 +0000
commit98751108b11dc748cc99230ca0fc1acfdf2c8929 (patch)
tree7587c21fe0f038560c5a427eaa1f6614ced604ff /models/migrations/v1_22
parent072b029b336a3d12c40060e8472373fded676dc2 (diff)
downloadgitea-98751108b11dc748cc99230ca0fc1acfdf2c8929.tar.gz
gitea-98751108b11dc748cc99230ca0fc1acfdf2c8929.zip
Rename project board -> column to make the UI less confusing (#30170)
This PR split the `Board` into two parts. One is the struct has been renamed to `Column` and the second we have a `Template Type`. But to make it easier to review, this PR will not change the database schemas, they are just renames. The database schema changes could be in future PRs. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: yp05327 <576951401@qq.com>
Diffstat (limited to 'models/migrations/v1_22')
-rw-r--r--models/migrations/v1_22/v293_test.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/models/migrations/v1_22/v293_test.go b/models/migrations/v1_22/v293_test.go
index ccc92f39a6..cfe4345143 100644
--- a/models/migrations/v1_22/v293_test.go
+++ b/models/migrations/v1_22/v293_test.go
@@ -15,7 +15,7 @@ import (
func Test_CheckProjectColumnsConsistency(t *testing.T) {
// Prepare and load the testing database
- x, deferable := base.PrepareTestEnv(t, 0, new(project.Project), new(project.Board))
+ x, deferable := base.PrepareTestEnv(t, 0, new(project.Project), new(project.Column))
defer deferable()
if x == nil || t.Failed() {
return
@@ -23,22 +23,22 @@ func Test_CheckProjectColumnsConsistency(t *testing.T) {
assert.NoError(t, CheckProjectColumnsConsistency(x))
- // check if default board was added
- var defaultBoard project.Board
- has, err := x.Where("project_id=? AND `default` = ?", 1, true).Get(&defaultBoard)
+ // check if default column was added
+ var defaultColumn project.Column
+ has, err := x.Where("project_id=? AND `default` = ?", 1, true).Get(&defaultColumn)
assert.NoError(t, err)
assert.True(t, has)
- assert.Equal(t, int64(1), defaultBoard.ProjectID)
- assert.True(t, defaultBoard.Default)
+ assert.Equal(t, int64(1), defaultColumn.ProjectID)
+ assert.True(t, defaultColumn.Default)
// check if multiple defaults, previous were removed and last will be kept
- expectDefaultBoard, err := project.GetBoard(db.DefaultContext, 2)
+ expectDefaultColumn, err := project.GetColumn(db.DefaultContext, 2)
assert.NoError(t, err)
- assert.Equal(t, int64(2), expectDefaultBoard.ProjectID)
- assert.False(t, expectDefaultBoard.Default)
+ assert.Equal(t, int64(2), expectDefaultColumn.ProjectID)
+ assert.False(t, expectDefaultColumn.Default)
- expectNonDefaultBoard, err := project.GetBoard(db.DefaultContext, 3)
+ expectNonDefaultColumn, err := project.GetColumn(db.DefaultContext, 3)
assert.NoError(t, err)
- assert.Equal(t, int64(2), expectNonDefaultBoard.ProjectID)
- assert.True(t, expectNonDefaultBoard.Default)
+ assert.Equal(t, int64(2), expectNonDefaultColumn.ProjectID)
+ assert.True(t, expectNonDefaultColumn.Default)
}