gitea icon indicating copy to clipboard operation
gitea copied to clipboard

MSSQL error `DROP INDEX IF EXISTS: Incorrect syntax near the keyword ‘IF’`

Open wxiaoguang opened this issue 1 year ago • 2 comments

https://forum.gitea.com/t/add-support-for-sha256-git-repositories-failed/9062

2024/04/30 17:15:03 routers/init.go:72:mustInitCtx() [F] ... failed: migrate: migration[286]: Add support for SHA256 git repositories failed: DROP INDEX IF EXISTS [IDX_commit_status_context_hash] ON [commit_status] mssql: Incorrect syntax near the keyword ‘IF’.

@lunny

wxiaoguang avatar May 06 '24 10:05 wxiaoguang

Which MSSQL version? The forum link seems 404.

https://learn.microsoft.com/en-us/sql/t-sql/statements/drop-index-transact-sql?view=sql-server-ver16 indicates 2016 and above supports IF EXISTS clause.

silverwind avatar May 07 '24 22:05 silverwind

The forum is under maintaining. https://discord.com/channels/322538954119184384/537668686173962260/1237579999708577803

lunny avatar May 08 '24 01:05 lunny