Hash key for plugin store table and limit plugin ID length (#7915)

* Hash plugin store keys and update column limits

* Limit plugin ID length on install

* Add note to manifest id and allow zero length keys
Этот коммит содержится в:
Joram Wilander
2017-12-01 15:20:08 -05:00
коммит произвёл GitHub
родитель 739d91f213
Коммит c3af878573
6 изменённых файлов: 35 добавлений и 17 удалений

Просмотреть файл

@@ -102,8 +102,9 @@ type PluginSettingsSchema struct {
// help_text: When true, an extra thing will be enabled!
// default: false
type Manifest struct {
// The id is a globally unique identifier that represents your plugin. Reverse-DNS notation
// using a name you control is a good option. For example, "com.mycompany.myplugin".
// The id is a globally unique identifier that represents your plugin. Ids are limited
// to 200 characters. Reverse-DNS notation using a name you control is a good option.
// For example, "com.mycompany.myplugin".
Id string `json:"id" yaml:"id"`
// The name to be displayed for the plugin.

Просмотреть файл

@@ -9,8 +9,8 @@ import (
)
const (
KEY_VALUE_PLUGIN_ID_MAX_RUNES = 100
KEY_VALUE_KEY_MAX_RUNES = 100
KEY_VALUE_PLUGIN_ID_MAX_RUNES = 200
KEY_VALUE_KEY_MAX_RUNES = 50
)
type PluginKeyValue struct {