summaryrefslogtreecommitdiffstats
path: root/store/sqlstore
diff options
context:
space:
mode:
Diffstat (limited to 'store/sqlstore')
-rw-r--r--store/sqlstore/channel_store.go5
-rw-r--r--store/sqlstore/upgrade.go10
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)
+ }
+
}