Fix Migration 145 on MSSQL if varchar is changed to nvarchar (#12445)
Fix Migration 145 on MSSQL if varchar is changed to nvarchar (#12445)

* Handle MSSQL constraints

Signed-off-by: Andrew Thornton <6a547fdd28db89120bdd70d4af1f9ba672ccd43a@cantab.net>

* Update models/migrations/v145.go

* Prevent hang with Sync2

* Agh it's uniques not indexes

* Let us try a different way of finding constraints on the language column

Signed-off-by: Andrew Thornton <6a547fdd28db89120bdd70d4af1f9ba672ccd43a@cantab.net>

* minor simplification

Signed-off-by: Andrew Thornton <6a547fdd28db89120bdd70d4af1f9ba672ccd43a@cantab.net>

* Try drop index instead?

Signed-off-by: Andrew Thornton <6a547fdd28db89120bdd70d4af1f9ba672ccd43a@cantab.net>
go-gitea/gitea,vCaesar/gitea,vCaesar/gitea,go-gitea/gitea,sapk-fork/gitea,vdbt/gitea,cez81/gitea,vdbt/gitea,sapk-fork/gitea,cez81/gitea,sapk-fork/gitea,sapk-fork/gitea,go-gitea/gitea,cez81/gitea