Sessions: log db name before opening
This commit is contained in:
parent
3ee33362f0
commit
17da54d56c
1 changed files with 1 additions and 1 deletions
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue