summaryrefslogtreecommitdiffstats
path: root/store/sql_post_store.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-01-28 11:39:48 -0500
committer=Corey Hulen <corey@hulen.com>2016-01-28 11:39:48 -0500
commit2138b46f6cdab5fca49680c2e1994703ab71b1c3 (patch)
treed143d3dc67122019d96d135ae5f2fe39b79ace7c /store/sql_post_store.go
parentfa6daad64d474e99f3a2964784585a748350c25a (diff)
downloadchat-2138b46f6cdab5fca49680c2e1994703ab71b1c3.tar.gz
chat-2138b46f6cdab5fca49680c2e1994703ab71b1c3.tar.bz2
chat-2138b46f6cdab5fca49680c2e1994703ab71b1c3.zip
PLT-1765 allowing support of 2 previous versions
Diffstat (limited to 'store/sql_post_store.go')
-rw-r--r--store/sql_post_store.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index 2d5d66e0d..aeaa5922c 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -38,6 +38,11 @@ func NewSqlPostStore(sqlStore *SqlStore) PostStore {
}
func (s SqlPostStore) UpgradeSchemaIfNeeded() {
+ // ADDED for 1.3 REMOVE for 1.6
+ s.RemoveColumnIfExists("Posts", "ImgCount")
+
+ // ADDED for 1.3 REMOVE for 1.6
+ s.GetMaster().Exec(`UPDATE Preferences SET Type = :NewType WHERE Type = :CurrentType`, map[string]string{"NewType": model.POST_JOIN_LEAVE, "CurrentType": "join_leave"})
}
func (s SqlPostStore) CreateIndexesIfNotExists() {