diff options
author | cpanato <ctadeu@gmail.com> | 2018-09-04 23:27:39 +0200 |
---|---|---|
committer | cpanato <ctadeu@gmail.com> | 2018-09-04 23:27:39 +0200 |
commit | 4cf6913c1c58847b69bd7a16f046d4bfc676bdb4 (patch) | |
tree | dbad14ece2033e395eb8f93920ce7256da803f35 /store/sqlstore | |
parent | 50af3a19a2817097355df9fd70c0fda0328d8bae (diff) | |
parent | d2190527eafdae31e14ba0832dcfb79a0a1e223b (diff) | |
download | chat-4cf6913c1c58847b69bd7a16f046d4bfc676bdb4.tar.gz chat-4cf6913c1c58847b69bd7a16f046d4bfc676bdb4.tar.bz2 chat-4cf6913c1c58847b69bd7a16f046d4bfc676bdb4.zip |
Merge remote-tracking branch 'upstream/release-5.3' into release-5.3-daily-merge-20180904
Diffstat (limited to 'store/sqlstore')
-rw-r--r-- | store/sqlstore/channel_store.go | 5 | ||||
-rw-r--r-- | store/sqlstore/upgrade.go | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/store/sqlstore/channel_store.go b/store/sqlstore/channel_store.go index a09c00082..1b5ae7ff7 100644 --- a/store/sqlstore/channel_store.go +++ b/store/sqlstore/channel_store.go @@ -463,6 +463,11 @@ func (s SqlChannelStore) Update(channel *model.Channel) store.StoreChannel { return store.Do(func(result *store.StoreResult) { channel.PreUpdate() + if channel.DeleteAt != 0 { + result.Err = model.NewAppError("SqlChannelStore.Update", "store.sql_channel.update.archived_channel.app_error", nil, "", http.StatusBadRequest) + return + } + if result.Err = channel.IsValid(); result.Err != nil { return } diff --git a/store/sqlstore/upgrade.go b/store/sqlstore/upgrade.go index 4d7d4addc..ad71095e1 100644 --- a/store/sqlstore/upgrade.go +++ b/store/sqlstore/upgrade.go @@ -484,10 +484,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) - // } + if shouldPerformUpgrade(sqlStore, VERSION_5_2_0, VERSION_5_3_0) { + saveSchemaVersion(sqlStore, VERSION_5_3_0) + } + } |