refactor: Use modernc.org/sqlite

This commit is contained in:
Felicitas Pojtinger
2022-01-07 20:53:44 +01:00
parent f31e4aea9c
commit ba5d81ef7c
7 changed files with 165 additions and 66 deletions

View File

@@ -13,9 +13,9 @@ import (
"path/filepath"
"regexp"
_ "github.com/mattn/go-sqlite3"
"github.com/pkg/errors"
"github.com/spf13/viper"
_ "modernc.org/sqlite"
)
var rgxSQLitekey = regexp.MustCompile(`(?mi)((,\n)?\s+foreign key.*?\n)+`)

View File

@@ -5,8 +5,8 @@ import (
"os"
"path/filepath"
_ "github.com/mattn/go-sqlite3"
migrate "github.com/rubenv/sql-migrate"
_ "modernc.org/sqlite"
)
type SQLite struct {
@@ -24,7 +24,7 @@ func (s *SQLite) Open() error {
}
// Open the DB
db, err := sql.Open("sqlite3", s.DBPath)
db, err := sql.Open("sqlite", s.DBPath)
if err != nil {
return err
}