You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#29874 (comment)
- The migration of v292 will miss many projects. These projects will
have no default board. This PR introduced a new migration number and
removed v292 migration.
- This PR also added the missed transactions on project-related
operations.
- Only `SetDefaultBoard` will remove duplicated defaults but not in
`GetDefaultBoard`
iferr:=sess.SQL("SELECT DISTINCT `p`.`id`, `p`.`creator_id` FROM `project` `p` WHERE (SELECT COUNT(*) FROM `project_board` `pb` WHERE `pb`.`project_id` = `p`.`id` AND `pb`.`default` = ?) != 1", true).
33
-
Limit(limit, start).
34
-
Find(&projects); err!=nil {
35
-
returnerr
36
-
}
37
-
38
-
iflen(projects) ==0 {
39
-
break
40
-
}
41
-
start+=len(projects)
42
-
43
-
for_, p:=rangeprojects {
44
-
varboards []project.Board
45
-
iferr:=sess.Where("project_id=? AND `default` = ?", p.ID, true).OrderBy("sorting").Find(&boards); err!=nil {
0 commit comments