feat: allow using sqlite in memory database
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This allows running vikunja for testing purposes. You almost never want to run this in production.
This commit is contained in:
parent
827c43fe12
commit
2dab2ccedd
|
@ -179,6 +179,10 @@ func initSqliteEngine() (engine *xorm.Engine, err error) {
|
|||
path = "./db.db"
|
||||
}
|
||||
|
||||
if path == "memory" {
|
||||
return xorm.NewEngine("sqlite3", "file::memory:?cache=shared")
|
||||
}
|
||||
|
||||
// Try opening the db file to return a better error message if that does not work
|
||||
var exists = true
|
||||
if _, err := os.Stat(path); err != nil {
|
||||
|
|
Loading…
Reference in New Issue