| @@ -23,7 +23,8 @@ var customMigrations = []CustomMigration{ | |||||
| var customMigrationsStatic = []CustomMigrationStatic{ | var customMigrationsStatic = []CustomMigrationStatic{ | ||||
| {"Alter user static table field type ", alterUserStaticTable}, | {"Alter user static table field type ", alterUserStaticTable}, | ||||
| {"Delete zuzhi user history data ", deleteNotDisplayUser}, | |||||
| {"Delete organization user history data ", deleteNotDisplayUser}, | |||||
| {"update issue_fixed_rate to 1 if num_issues is 0 ", updateIssueFixedRate}, | |||||
| } | } | ||||
| func MigrateCustom(x *xorm.Engine) { | func MigrateCustom(x *xorm.Engine) { | ||||
| @@ -83,3 +84,9 @@ func deleteNotDisplayUser(x *xorm.Engine, static *xorm.Engine) error { | |||||
| return nil | return nil | ||||
| } | } | ||||
| func updateIssueFixedRate(x *xorm.Engine, static *xorm.Engine) error { | |||||
| updateSQL := "update repo_statistic set issue_fixed_rate=1.0 where num_issues=0" | |||||
| _, err := static.Exec(updateSQL) | |||||
| return err | |||||
| } | |||||