PLT-1765 allowing support of 2 previous versions

Этот коммит содержится в:
=Corey Hulen
2016-01-28 11:39:48 -05:00
родитель fa6daad64d
Коммит 2138b46f6c
5 изменённых файлов: 93 добавлений и 50 удалений

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

@@ -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() {