Add --sqlite option (#4841)
This commit is contained in:
parent
b26cf6d9b9
commit
59bcc1fa52
5 changed files with 12 additions and 2 deletions
|
|
@ -26,7 +26,8 @@ func New(driver, dsn string) (*gorm.DB, error) {
|
|||
if err := os.MkdirAll(filepath.Dir(file), os.ModePerm); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
dialect = sqlite.Open(file)
|
||||
// avoid busy errors
|
||||
dialect = sqlite.Open(file + "?_pragma=busy_timeout(5000)")
|
||||
// case "postgres":
|
||||
// dialect = postgres.Open(dsn)
|
||||
// case "mysql":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue