Move sql store code into store/sqlstore package (#7502)
* move sql store code into store/sqlstore package * move non-sql constants back up to store * fix api test * derp
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
b2c5b97601
Коммит
49fe5fbf3d
@@ -10,6 +10,7 @@ import (
|
||||
l4g "github.com/alecthomas/log4go"
|
||||
"github.com/mattermost/mattermost-server/jobs"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/store/sqlstore"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -36,7 +37,7 @@ func jobserverCmdF(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
defer l4g.Close()
|
||||
|
||||
jobs.Srv.Store = store.NewLayeredStore(a.Metrics, a.Cluster)
|
||||
jobs.Srv.Store = store.NewLayeredStore(sqlstore.NewSqlSupplier(a.Metrics), a.Metrics, a.Cluster)
|
||||
defer jobs.Srv.Store.Close()
|
||||
|
||||
jobs.Srv.LoadLicense()
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/mattermost/mattermost-server/store/sqlstore"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -32,5 +33,7 @@ func printVersion(a *app.App) {
|
||||
CommandPrintln("Build Date: " + model.BuildDate)
|
||||
CommandPrintln("Build Hash: " + model.BuildHash)
|
||||
CommandPrintln("Build Enterprise Ready: " + model.BuildEnterpriseReady)
|
||||
CommandPrintln("DB Version: " + a.Srv.Store.(*store.LayeredStore).DatabaseLayer.GetCurrentSchemaVersion())
|
||||
if supplier, ok := a.Srv.Store.(*store.LayeredStore).DatabaseLayer.(*sqlstore.SqlSupplier); ok {
|
||||
CommandPrintln("DB Version: " + supplier.GetCurrentSchemaVersion())
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user