repo: update repository description field to contain more than 256 symbols (#5219)

* Update repository description field to contain more than 256 symbols

- update repository model - description field now is `TEXT` and limited by 4000 symbols
- new migration
- add description to html forms - repo creation and repo settings
- add translation for description

* Update for description field, new features

- add autosize (height) for description textarea, new plugin
- set max description length to 512 symbols
- update locales

* Fix migration - typo in var

* Update repo description behaviour

- add textarea autosize for /repo/create
- add symbols counter under description testarea (create/edit)

* Fix function definition - it a var

* Revert ru-RU locale

* Update by review

- Use type `varchar(512)` in migration
- Remove unused files from autosize plugin

* Fix migration - new project paths

* Fixes after review 2

- copyright year
- format includes
- use switch instead of multi-if

* Remove unused `default:` option.
This commit is contained in:
Sergey Dryabzhinsky
2018-06-11 15:34:26 +03:00
committed by 无闻
parent 459c8be94f
commit 57897cc8c2
12 changed files with 103 additions and 9 deletions

View File

@@ -64,6 +64,8 @@ var migrations = []Migration{
NewMigration("update repository sizes", updateRepositorySizes),
// v16 -> v17:v0.10.31
NewMigration("remove invalid protect branch whitelist", removeInvalidProtectBranchWhitelist),
// v17 -> v18:v0.11.48
NewMigration("store long text in repository description field", updateRepositoryDescriptionField),
}
// Migrate database to current version