summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2015-10-08 15:31:34 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2015-10-08 15:31:34 -0400
commit9a177d7aa8b26fff80f2a334ac826a67b96baffc (patch)
tree9dca2bf003c02a1f1e59fccc7d0c3376e2b0bd3c /store
parent20c766aed5bfe22d2563e7081dfa76917ce32e7d (diff)
parentb7a4b1a418c7cf149c37525feebd410b1b0704c5 (diff)
downloadchat-9a177d7aa8b26fff80f2a334ac826a67b96baffc.tar.gz
chat-9a177d7aa8b26fff80f2a334ac826a67b96baffc.tar.bz2
chat-9a177d7aa8b26fff80f2a334ac826a67b96baffc.zip
Merge pull request #983 from mattermost/fix-db-upgrade
Fixing db upgrade for 1.1
Diffstat (limited to 'store')
-rw-r--r--store/sql_channel_store.go3
-rw-r--r--store/sql_store.go7
-rw-r--r--store/sql_team_store.go1
-rw-r--r--store/sql_user_store.go1
4 files changed, 3 insertions, 9 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go
index a54e6ba54..56e190fee 100644
--- a/store/sql_channel_store.go
+++ b/store/sql_channel_store.go
@@ -38,6 +38,8 @@ func NewSqlChannelStore(sqlStore *SqlStore) ChannelStore {
}
func (s SqlChannelStore) UpgradeSchemaIfNeeded() {
+
+ // BEGIN REMOVE AFTER 1.1.0
if s.CreateColumnIfNotExists("ChannelMembers", "NotifyProps", "varchar(2000)", "varchar(2000)", "{}") {
// populate NotifyProps from existing NotifyLevel field
@@ -80,6 +82,7 @@ func (s SqlChannelStore) UpgradeSchemaIfNeeded() {
s.RemoveColumnIfExists("ChannelMembers", "NotifyLevel")
}
+ // END REMOVE AFTER 1.1.0
}
func (s SqlChannelStore) CreateIndexesIfNotExists() {
diff --git a/store/sql_store.go b/store/sql_store.go
index 9ec899f7c..900543460 100644
--- a/store/sql_store.go
+++ b/store/sql_store.go
@@ -84,13 +84,6 @@ func NewSqlStore() Store {
}
}
- // Temporary upgrade code, remove after 0.8.0 release
- if sqlStore.DoesTableExist("Sessions") {
- if sqlStore.DoesColumnExist("Sessions", "AltId") {
- sqlStore.GetMaster().Exec("DROP TABLE IF EXISTS Sessions")
- }
- }
-
sqlStore.team = NewSqlTeamStore(sqlStore)
sqlStore.channel = NewSqlChannelStore(sqlStore)
sqlStore.post = NewSqlPostStore(sqlStore)
diff --git a/store/sql_team_store.go b/store/sql_team_store.go
index ff1d4ac35..de44782cf 100644
--- a/store/sql_team_store.go
+++ b/store/sql_team_store.go
@@ -28,7 +28,6 @@ func NewSqlTeamStore(sqlStore *SqlStore) TeamStore {
}
func (s SqlTeamStore) UpgradeSchemaIfNeeded() {
- s.RemoveColumnIfExists("Teams", "AllowValet")
}
func (s SqlTeamStore) CreateIndexesIfNotExists() {
diff --git a/store/sql_user_store.go b/store/sql_user_store.go
index f36226cf8..011acd7e4 100644
--- a/store/sql_user_store.go
+++ b/store/sql_user_store.go
@@ -41,7 +41,6 @@ func NewSqlUserStore(sqlStore *SqlStore) UserStore {
}
func (us SqlUserStore) UpgradeSchemaIfNeeded() {
- us.CreateColumnIfNotExists("Users", "ThemeProps", "varchar(2000)", "character varying(2000)", "{}")
}
func (us SqlUserStore) CreateIndexesIfNotExists() {