summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorn1aba <n1aba.github@gmail.com>2018-09-04 14:24:41 +0300
committerCarlos Tadeu Panato Junior <ctadeu@gmail.com>2018-09-04 13:24:41 +0200
commit50af3a19a2817097355df9fd70c0fda0328d8bae (patch)
tree3c7447b534336d887c1bb739015cb51bcfb75ccf /store
parent30fa6eca69372223f67ab09db7fc639ff9f57264 (diff)
downloadchat-50af3a19a2817097355df9fd70c0fda0328d8bae.tar.gz
chat-50af3a19a2817097355df9fd70c0fda0328d8bae.tar.bz2
chat-50af3a19a2817097355df9fd70c0fda0328d8bae.zip
MM-11703: Update incoming and outgoing webhook description to 500 characters (#9265)
* MM-11703: Update incoming and outgoing webhook description to 500 characters * MM-11703: Add upgrade code * MM-11703: Remove MAX_DESCRIPTION_LENGTH constants * MM-11703: GOFMT * MM-11703: Move upgrade code to version 5.3 * MM-11703: Comment back upgrade to 5.3.0 * MM-11703: Add API errors back * MM-11703: Copy-Paste
Diffstat (limited to 'store')
-rw-r--r--store/sqlstore/upgrade.go3
-rw-r--r--store/sqlstore/webhook_store.go4
2 files changed, 4 insertions, 3 deletions
diff --git a/store/sqlstore/upgrade.go b/store/sqlstore/upgrade.go
index ab3bd202b..4d7d4addc 100644
--- a/store/sqlstore/upgrade.go
+++ b/store/sqlstore/upgrade.go
@@ -486,7 +486,8 @@ func UpgradeDatabaseToVersion52(sqlStore SqlStore) {
func UpgradeDatabaseToVersion53(sqlStore SqlStore) {
// TODO: Uncomment following condition when version 5.3.0 is released
// if shouldPerformUpgrade(sqlStore, VERSION_5_2_0, VERSION_5_3_0) {
-
+ sqlStore.AlterColumnTypeIfExists("OutgoingWebhooks", "Description", "varchar(500)", "varchar(500)")
+ sqlStore.AlterColumnTypeIfExists("IncomingWebhooks", "Description", "varchar(500)", "varchar(500)")
// saveSchemaVersion(sqlStore, VERSION_5_3_0)
// }
}
diff --git a/store/sqlstore/webhook_store.go b/store/sqlstore/webhook_store.go
index f3c572aaf..94eadf836 100644
--- a/store/sqlstore/webhook_store.go
+++ b/store/sqlstore/webhook_store.go
@@ -47,7 +47,7 @@ func NewSqlWebhookStore(sqlStore SqlStore, metrics einterfaces.MetricsInterface)
table.ColMap("ChannelId").SetMaxSize(26)
table.ColMap("TeamId").SetMaxSize(26)
table.ColMap("DisplayName").SetMaxSize(64)
- table.ColMap("Description").SetMaxSize(128)
+ table.ColMap("Description").SetMaxSize(500)
tableo := db.AddTableWithName(model.OutgoingWebhook{}, "OutgoingWebhooks").SetKeys(false, "Id")
tableo.ColMap("Id").SetMaxSize(26)
@@ -58,7 +58,7 @@ func NewSqlWebhookStore(sqlStore SqlStore, metrics einterfaces.MetricsInterface)
tableo.ColMap("TriggerWords").SetMaxSize(1024)
tableo.ColMap("CallbackURLs").SetMaxSize(1024)
tableo.ColMap("DisplayName").SetMaxSize(64)
- tableo.ColMap("Description").SetMaxSize(128)
+ tableo.ColMap("Description").SetMaxSize(500)
tableo.ColMap("ContentType").SetMaxSize(128)
tableo.ColMap("TriggerWhen").SetMaxSize(1)
tableo.ColMap("Username").SetMaxSize(64)