gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Remove If Exist check on migration for mssql because that syntax required SQL server 2016

Open lunny opened this issue 1 year ago • 4 comments

Fix #30872

We will assume the database is consistent before executing the migration. So the indexes should exist. Removing IF EXIST then is safe enough.

lunny avatar May 08 '24 04:05 lunny

Can we catch the error when index not existing, then only show a warning, and return no error? Maybe CI failure related.

yp05327 avatar May 08 '24 13:05 yp05327

Can we catch the error when index not existing, then only show a warning, and return no error? Maybe CI failure related.

CI failure is unrelated. It's an actions/setup-go upgrade problem. I think it's hard to catch the error of MSSQL for different versions. And it should be right, otherwise it means Gitea's database has been broken in previous migrations or situations.

lunny avatar May 08 '24 13:05 lunny

I think we should raise the MSSQL requirement to 2016 for v1.23, e.g. follow the "Security Support" category of https://endoflife.date/mssqlserver.

silverwind avatar May 08 '24 13:05 silverwind

https://github.com/go-gitea/gitea/actions/runs/8996206824/job/24712337648#step:8:142 no there is another fail

yp05327 avatar May 08 '24 14:05 yp05327

2 approvements can be done later.

* wait for xorm support checking whether index exists

* raise the MSSQL requirement to 2016 for v1.23

https://github.com/go-gitea/gitea/pull/30949 to raise the requirement to 2017.

silverwind avatar May 11 '24 18:05 silverwind