feat: add sqlite-backed API docs and tests
All checks were successful
ci / test-and-build (push) Successful in 11m21s
All checks were successful
ci / test-and-build (push) Successful in 11m21s
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
_ "modernc.org/sqlite"
|
||||
)
|
||||
|
||||
//go:embed migrations/001_initial.sql
|
||||
@@ -18,7 +18,7 @@ func Open(databaseURL string) (*sql.DB, error) {
|
||||
return nil, fmt.Errorf("mkdir db dir: %w", err)
|
||||
}
|
||||
|
||||
db, err := sql.Open("sqlite3", databaseURL+"?_foreign_keys=on&_busy_timeout=5000")
|
||||
db, err := sql.Open("sqlite", databaseURL+"?_pragma=foreign_keys(1)&_pragma=busy_timeout(5000)")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user