mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix index column deletion (#2651)
This commit is contained in:
		@@ -17,7 +17,7 @@ func removeIndexColumnFromRepoUnitTable(x *xorm.Engine) (err error) {
 | 
				
			|||||||
	case setting.UseSQLite3:
 | 
						case setting.UseSQLite3:
 | 
				
			||||||
		log.Warn("Unable to drop columns in SQLite")
 | 
							log.Warn("Unable to drop columns in SQLite")
 | 
				
			||||||
	case setting.UseMySQL, setting.UsePostgreSQL, setting.UseMSSQL, setting.UseTiDB:
 | 
						case setting.UseMySQL, setting.UsePostgreSQL, setting.UseMSSQL, setting.UseTiDB:
 | 
				
			||||||
		if _, err := x.Exec("ALTER TABLE repo_unit DROP COLUMN index"); err != nil {
 | 
							if _, err := x.Exec("ALTER TABLE repo_unit DROP COLUMN `index`"); err != nil {
 | 
				
			||||||
			return fmt.Errorf("DROP COLUMN index: %v", err)
 | 
								return fmt.Errorf("DROP COLUMN index: %v", err)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	default:
 | 
						default:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user