summaryrefslogtreecommitdiffstats
path: root/store/sql_post_store.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-09 15:25:41 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-09 15:25:41 -0500
commitbb9615796077d4adb6d4bbe2b9e8f0e655254ec1 (patch)
treec7ae633e14ac2fd363c7010a7f957fea69147a74 /store/sql_post_store.go
parentb0fde13147a84ee06e349eeff7d18e5e37980fc2 (diff)
downloadchat-bb9615796077d4adb6d4bbe2b9e8f0e655254ec1.tar.gz
chat-bb9615796077d4adb6d4bbe2b9e8f0e655254ec1.tar.bz2
chat-bb9615796077d4adb6d4bbe2b9e8f0e655254ec1.zip
Removing old DB upgrade code
Diffstat (limited to 'store/sql_post_store.go')
-rw-r--r--store/sql_post_store.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go
index 3460fca92..3a25fe89b 100644
--- a/store/sql_post_store.go
+++ b/store/sql_post_store.go
@@ -9,10 +9,8 @@ import (
"strconv"
"strings"
- l4g "code.google.com/p/log4go"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
- "time"
)
type SqlPostStore struct {
@@ -40,21 +38,6 @@ func NewSqlPostStore(sqlStore *SqlStore) PostStore {
}
func (s SqlPostStore) UpgradeSchemaIfNeeded() {
- colType := s.GetColumnDataType("Posts", "Props")
- if colType != "text" {
-
- query := "ALTER TABLE Posts MODIFY COLUMN Props TEXT"
- if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_POSTGRES {
- query = "ALTER TABLE Posts ALTER COLUMN Props TYPE text"
- }
-
- _, err := s.GetMaster().Exec(query)
- if err != nil {
- l4g.Critical("Failed to alter column Posts.Props to TEXT: " + err.Error())
- time.Sleep(time.Second)
- panic("Failed to alter column Posts.Props to TEXT: " + err.Error())
- }
- }
}
func (s SqlPostStore) CreateIndexesIfNotExists() {