Corteza no longer defaults to MySQL db

Default DB_DSN changed from
mysql://corteza:corteza@tcp(db:3306)/corteza?collation=utf8mb4_general_ci

to
sqlite3://file::memory:?cache=shared&mode=memory
This commit is contained in:
Denis Arh
2020-11-10 14:48:42 +01:00
parent 9b0308f36c
commit 724976271a
+2 -6
View File
@@ -2,7 +2,6 @@ package options
import (
"strings"
"time"
)
type (
@@ -12,16 +11,13 @@ type (
)
func DB(pfix string) (o *DBOpt) {
const delay = 15 * time.Second
const maxTries = 100
o = &DBOpt{
DSN: "mysql://corteza:corteza@tcp(db:3306)/corteza?collation=utf8mb4_general_ci",
DSN: "sqlite3://file::memory:?cache=shared&mode=memory",
}
fill(o)
if !strings.Contains(o.DSN, "://") {
if o.DSN != "" && !strings.Contains(o.DSN, "://") {
// Make sure DSN is compatible with new requirements
o.DSN = "mysql://" + o.DSN
}