From 724976271acd7722c4540433d0488f2e650830a0 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Tue, 10 Nov 2020 14:48:15 +0100 Subject: [PATCH] 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 --- pkg/options/db.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkg/options/db.go b/pkg/options/db.go index 8afa7adc2..8e34cc10b 100644 --- a/pkg/options/db.go +++ b/pkg/options/db.go @@ -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 }