feat: allow using sqlite in memory database
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"
|
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
|
// Try opening the db file to return a better error message if that does not work
|
||||||
var exists = true
|
var exists = true
|
||||||
if _, err := os.Stat(path); err != nil {
|
if _, err := os.Stat(path); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user