Skip to content

Commit e7588cd

Browse files
authored
Use If not Switch
1 parent 496463c commit e7588cd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

models/migrations/v191.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ func alterIssueAndCommentTextFieldsToLongText(x *xorm.Engine) error {
1717
return err
1818
}
1919

20-
switch {
21-
case setting.Database.UseMySQL:
20+
if setting.Database.UseMySQL {
2221
if _, err := sess.Exec("ALTER TABLE `issue` CHANGE `content` `content` LONGTEXT"); err != nil {
2322
return err
2423
}
2524
if _, err := sess.Exec("ALTER TABLE `comment` CHANGE `content` `content` LONGTEXT, CHANGE `patch` `patch` LONGTEXT"); err != nil {
2625
return err
2726
}
28-
default:
29-
// only MySQL needs to widen the TEXT limitation. pgsql/mssql/sqlite do not have such limitation.
3027
}
3128
return sess.Commit()
3229
}

0 commit comments

Comments
 (0)