Skip to content

Commit

Permalink
Sessions: log db name before opening
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jan 4, 2023
1 parent 3ee3336 commit 17da54d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ func New(driver, dsn string) (*gorm.DB, error) {
if err != nil {
return nil, err
}
log.INFO.Println("using sqlite database:", file)
if err := os.MkdirAll(filepath.Dir(file), os.ModePerm); err != nil {
return nil, err
}
log.INFO.Println("using sqlite database:", file)
// avoid busy errors
dialect = sqlite.Open(file + "?_pragma=busy_timeout(5000)")
// case "postgres":
Expand Down

0 comments on commit 17da54d

Please sign in to comment.