(key string)
| 187 | } |
| 188 | |
| 189 | func DeleteSettingItemByKey(key string) error { |
| 190 | old, err := GetSettingItemByKey(key) |
| 191 | if err != nil { |
| 192 | return errors.WithMessage(err, "failed to get settingItem") |
| 193 | } |
| 194 | if !old.IsDeprecated() { |
| 195 | return errors.Errorf("setting [%s] is not deprecated", key) |
| 196 | } |
| 197 | SettingCacheUpdate() |
| 198 | return db.DeleteSettingItemByKey(key) |
| 199 | } |
| 200 | |
| 201 | type MigrationValueItem struct { |
| 202 | MigrationValue, Value string |
no test coverage detected