]> source.dussan.org Git - gitea.git/commit
Improve indices for `action` table (#23532)
authorZettat123 <zettat123@gmail.com>
Fri, 24 Mar 2023 15:44:33 +0000 (23:44 +0800)
committerGitHub <noreply@github.com>
Fri, 24 Mar 2023 15:44:33 +0000 (23:44 +0800)
commitb958dba1a0f84b986acdb82a6609d70d98140640
treee1dae37308862c147577b639f26cad1fe92e24c2
parente52ea44edd99e6ec1c5567c78e663802cdf3cf91
Improve indices for `action` table (#23532)

Close #21611

Add the index mentioned in
https://github.com/go-gitea/gitea/issues/21611#issuecomment-1451113252 .
Since we already have an index for `("created_unix", "user_id",
"is_deleted")` columns on PostgreSQL, I removed the database type check
to apply this index to all types of databases.
models/activities/action.go
models/migrations/migrations.go
models/migrations/v1_20/v249.go [new file with mode: 0644]