Tested with mysql, added simple fig file, need to write a more substantial fig setup
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
m "github.com/torkelo/grafana-pro/pkg/models"
|
||||
"github.com/torkelo/grafana-pro/pkg/setting"
|
||||
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/go-xorm/xorm"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
@@ -112,6 +113,8 @@ func getEngine() (*xorm.Engine, error) {
|
||||
return nil, fmt.Errorf("Unknown database type: %s", DbCfg.Type)
|
||||
}
|
||||
|
||||
log.Info("Database: %v, ConnectionString: %v", DbCfg.Type, cnnstr)
|
||||
|
||||
return xorm.NewEngine(DbCfg.Type, cnnstr)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user