1
0
Fork 0
forked from forgejo/forgejo

Increase size of the language column in language_stat (#12396)

In #12379 it was discovered that enry v2 has a maximum language length
of 34 characters which is larger than the 30 previously provided.

This PR updates the language column to 50.

Fix #12379
This commit is contained in:
zeripath 2020-08-04 14:54:29 +01:00 committed by GitHub
parent 3585bb73ef
commit 502e38c33c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 2 deletions

View file

@ -222,6 +222,8 @@ var migrations = []Migration{
NewMigration("recalculate Stars number for all user", recalculateStars),
// v144 -> v145
NewMigration("update Matrix Webhook http method to 'PUT'", updateMatrixWebhookHTTPMethod),
// v145 -> v146
NewMigration("Increase Language field to 50 in LanguageStats", increaseLanguageField),
}
// GetCurrentDBVersion returns the current db version
@ -464,7 +466,6 @@ func dropTableColumns(sess *xorm.Session, tableName string, columnNames ...strin
sess.Rollback()
return fmt.Errorf("Drop table `%s` columns %v: %v", tableName, columnNames, err)
}
return sess.Commit()
default:
log.Fatal("Unrecognized DB")