We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f631702 commit b80d649Copy full SHA for b80d649
models/migrations/v78.go
@@ -31,6 +31,8 @@ func renameRepoIsBareToIsEmpty(x *xorm.Engine) error {
31
var err error
32
if models.DbCfg.Type == core.POSTGRES || models.DbCfg.Type == core.SQLITE {
33
_, err = sess.Exec("DROP INDEX IF EXISTS IDX_repository_is_bare")
34
+ } else if models.DbCfg.Type == core.MSSQL {
35
+ _, err = sess.Exec("DROP INDEX IF EXISTS IDX_repository_is_bare ON repository")
36
} else {
37
_, err = sess.Exec("DROP INDEX IDX_repository_is_bare ON repository")
38
}
@@ -42,9 +44,6 @@ func renameRepoIsBareToIsEmpty(x *xorm.Engine) error {
42
44
return err
43
45
46
- // Then reset the values
- sess = x.NewSession()
47
- defer sess.Close()
48
if err := sess.Begin(); err != nil {
49
50
0 commit comments