summaryrefslogtreecommitdiffstats
path: root/store/sql_store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/sql_store.go')
-rw-r--r--store/sql_store.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/store/sql_store.go b/store/sql_store.go
index 2e679b81a..3c41cb1fc 100644
--- a/store/sql_store.go
+++ b/store/sql_store.go
@@ -64,9 +64,9 @@ func NewSqlStore() Store {
// Check to see if it's the most current database schema version
if !model.IsCurrentVersion(schemaVersion) {
// If we are upgrading from the previous version then print a warning and continue
- if model.IsLastVersion(schemaVersion) {
+ if model.IsPreviousVersion(schemaVersion) {
l4g.Warn("The database schema version of " + schemaVersion + " appears to be out of date")
- l4g.Warn("Attempting to upgrade the database schema version to " + model.GetFullVersion())
+ l4g.Warn("Attempting to upgrade the database schema version to " + model.CurrentVersion)
} else {
// If this is an 'upgrade needed' state but the user is attempting to skip a version then halt the world
l4g.Critical("The database schema version of " + schemaVersion + " cannot be upgraded. You must not skip a version.")
@@ -112,14 +112,14 @@ func NewSqlStore() Store {
sqlStore.oauth.(*SqlOAuthStore).CreateIndexesIfNotExists()
sqlStore.system.(*SqlSystemStore).CreateIndexesIfNotExists()
- if model.IsLastVersion(schemaVersion) {
- sqlStore.system.Update(&model.System{Name: "Version", Value: model.GetFullVersion()})
- l4g.Warn("The database schema has been upgraded to version " + model.GetFullVersion())
+ if model.IsPreviousVersion(schemaVersion) {
+ sqlStore.system.Update(&model.System{Name: "Version", Value: model.CurrentVersion})
+ l4g.Warn("The database schema has been upgraded to version " + model.CurrentVersion)
}
if schemaVersion == "" {
- sqlStore.system.Save(&model.System{Name: "Version", Value: model.GetFullVersion()})
- l4g.Info("The database schema has been set to version " + model.GetFullVersion())
+ sqlStore.system.Save(&model.System{Name: "Version", Value: model.CurrentVersion})
+ l4g.Info("The database schema has been set to version " + model.CurrentVersion)
}
return sqlStore