gitea
gitea copied to clipboard
Remove If Exist check on migration for mssql because that syntax required SQL server 2016
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.
Can we catch the error when index not existing, then only show a warning, and return no error? Maybe CI failure related.
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.
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.
https://github.com/go-gitea/gitea/actions/runs/8996206824/job/24712337648#step:8:142 no there is another fail
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.