]> source.dussan.org Git - gitea.git/commit
Fix migration v292 (#30153) v1.22.0-rc0
authorLunny Xiao <xiaolunwen@gmail.com>
Thu, 28 Mar 2024 16:14:30 +0000 (00:14 +0800)
committerGitHub <noreply@github.com>
Thu, 28 Mar 2024 16:14:30 +0000 (16:14 +0000)
commit40cdc84b368cce8328b4b49ea5ecf1c5fa040300
tree73bd6b10ee30881210271ae73d4e94ea2c5ad793
parent9585e19bb4386691760f741e23fba56cbfca8afb
Fix migration v292 (#30153)

Fix https://github.com/go-gitea/gitea/pull/29874#discussion_r1542227686

- 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`
models/migrations/migrations.go
models/migrations/v1_22/v292.go
models/migrations/v1_22/v292_test.go [deleted file]
models/migrations/v1_22/v293.go [new file with mode: 0644]
models/migrations/v1_22/v293_test.go [new file with mode: 0644]
models/project/board.go
models/project/board_test.go