aboutsummaryrefslogtreecommitdiffstats
path: root/models/migrations/v45.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrations/v45.go')
-rw-r--r--models/migrations/v45.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/migrations/v45.go b/models/migrations/v45.go
index 7a85908195..9ad27cf6db 100644
--- a/models/migrations/v45.go
+++ b/models/migrations/v45.go
@@ -5,10 +5,9 @@
package migrations
import (
- "fmt"
-
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
+
"github.com/go-xorm/xorm"
)
@@ -18,7 +17,8 @@ func removeIndexColumnFromRepoUnitTable(x *xorm.Engine) (err error) {
log.Warn("Unable to drop columns in SQLite")
case setting.UseMySQL, setting.UsePostgreSQL, setting.UseMSSQL, setting.UseTiDB:
if _, err := x.Exec("ALTER TABLE repo_unit DROP COLUMN `index`"); err != nil {
- return fmt.Errorf("DROP COLUMN index: %v", err)
+ // Ignoring this error in case we run this migration second time (after migration reordering)
+ log.Warn("DROP COLUMN index: %v", err)
}
default:
log.Fatal(4, "Unrecognized DB")