Files
gitea/models
9c116f2bb5 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 <[email protected]>

* try just dropping the index only

Signed-off-by: Andrew Thornton <[email protected]>

* use lowercase for system tables

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: Lauris BH <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2021-08-08 13:34:24 +03:00
..
2021-05-16 19:58:26 +08:00
2021-06-29 22:00:02 +01:00
2021-07-26 23:46:06 +03:00
2021-04-05 08:41:22 +01:00
2020-04-05 07:20:50 +01:00
2021-06-25 16:28:55 +02:00
2021-04-19 18:25:08 -04:00
2021-06-07 07:27:09 +02:00
2021-07-26 23:46:06 +03:00
2021-05-01 22:51:03 -04:00
2020-04-05 07:20:50 +01:00
2020-08-16 23:07:38 -04:00
2020-03-02 00:05:44 +02:00
2020-04-05 07:20:50 +01:00
2021-06-25 12:59:25 -04:00