diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-10-23 08:16:30 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-10-23 08:16:30 -0400 |
commit | 8db383d2e33520fcf4318f27d905418abdbc28da (patch) | |
tree | efeaeb86b1e3fa61f29d926bdbecdd6e4be5ffcb /store/sql_store.go | |
parent | d404aa1a4c38198ce48270c459882570d58f3202 (diff) | |
parent | f0a31c209deab9f6558d205fdec006f8c9ac9d48 (diff) | |
download | chat-8db383d2e33520fcf4318f27d905418abdbc28da.tar.gz chat-8db383d2e33520fcf4318f27d905418abdbc28da.tar.bz2 chat-8db383d2e33520fcf4318f27d905418abdbc28da.zip |
Merge pull request #1152 from jlebleu/PLT-797
PLT-797 Update System Table with latest version
Diffstat (limited to 'store/sql_store.go')
-rw-r--r-- | store/sql_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_store.go b/store/sql_store.go index d4d8fdf73..0d1bfe41b 100644 --- a/store/sql_store.go +++ b/store/sql_store.go @@ -73,6 +73,7 @@ func NewSqlStore() Store { } schemaVersion := sqlStore.GetCurrentSchemaVersion() + isSchemaVersion07 := false // If the version is already set then we are potentially in an 'upgrade needed' state if schemaVersion != "" { @@ -81,7 +82,6 @@ func NewSqlStore() Store { // If we are upgrading from the previous version then print a warning and continue // Special case - isSchemaVersion07 := false if schemaVersion == "0.7.1" || schemaVersion == "0.7.0" { isSchemaVersion07 = true } @@ -140,7 +140,7 @@ func NewSqlStore() Store { sqlStore.webhook.(*SqlWebhookStore).CreateIndexesIfNotExists() sqlStore.preference.(*SqlPreferenceStore).CreateIndexesIfNotExists() - if model.IsPreviousVersion(schemaVersion) { + if model.IsPreviousVersion(schemaVersion) || isSchemaVersion07 { sqlStore.system.Update(&model.System{Name: "Version", Value: model.CurrentVersion}) l4g.Warn("The database schema has been upgraded to version " + model.CurrentVersion) } |