mirror of https://github.com/go-gitea/gitea
Restore compatibility with SQLServer 2008 R2 in migrations (#16627)
* Restore compatibility with SQLServer 2008 R2 in migrations `ALTER TABLE DROP ... IF EXISTS ...` is only supported in SQL Server >16. The `IF EXISTS` here is a belt-and-braces and does not need to be present. Therefore can be dropped. We need to figure out some way of restricting our SQL syntax against the minimum version of SQL Server we will support. My suspicion is that `ALTER DATABASE database_name SET COMPATIBILITY_LEVEL = 100` may do that but there may be other side-effects so I am not whether to do that. Signed-off-by: Andrew Thornton <art27@cantab.net> * try just dropping the index only Signed-off-by: Andrew Thornton <art27@cantab.net> * use lowercase for system tables Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>pull/16653/head
parent
07bc380c9f
commit
9c116f2bb5
Loading…
Reference in new issue