diff --git a/storage/store/sql/sql.go b/storage/store/sql/sql.go index 0d2a68b9..4b40e1f6 100644 --- a/storage/store/sql/sql.go +++ b/storage/store/sql/sql.go @@ -63,6 +63,9 @@ func NewStore(driver, path string) (*Store, error) { if store.db, err = sql.Open(driver, path); err != nil { return nil, err } + if err := store.db.Ping(); err != nil { + return nil, err + } if driver == "sqlite" { _, _ = store.db.Exec("PRAGMA foreign_keys=ON") _, _ = store.db.Exec("PRAGMA journal_mode=WAL")