Skip to content

Commit 563db61

Browse files
committed
Add note about ignored errors
1 parent ec73c33 commit 563db61

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

models/migrations/v45.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ func removeIndexColumnFromRepoUnitTable(x *xorm.Engine) (err error) {
1818
log.Warn("Unable to drop columns in SQLite")
1919
case setting.UseMySQL, setting.UsePostgreSQL, setting.UseMSSQL, setting.UseTiDB:
2020
if _, err := x.Exec("ALTER TABLE repo_unit DROP COLUMN `index`"); err != nil {
21+
// Ignoring this error in case we run this migration second time (after migration reordeting)
2122
return fmt.Errorf("DROP COLUMN index: %v", err)
2223
}
2324
default:

models/migrations/v50.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func migrateProtectedBranchStruct(x *xorm.Engine) error {
4444
log.Warn("Unable to drop columns in SQLite")
4545
case setting.UseMySQL, setting.UsePostgreSQL, setting.UseMSSQL, setting.UseTiDB:
4646
if _, err := x.Exec("ALTER TABLE protected_branch DROP COLUMN can_push"); err != nil {
47+
// Ignoring this error in case we run this migration second time (after migration reordeting)
4748
log.Warn("DROP COLUMN can_push: %v", err)
4849
}
4950
default:

models/migrations/v51.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ func addDefaultValueToUserProhibitLogin(x *xorm.Engine) (err error) {
3434
}
3535

3636
if err != nil {
37+
// Ignoring this error in case we run this migration second time (after migration reordeting)
3738
log.Warn("Error changing user prohibit_login column definition: %v", err)
3839
}
3940

0 commit comments

Comments
 (0)